Common Azure Cost Optimisation Practices

Common Azure Cost Optimisation Practices

There are various ways to achieve a cost-effective, well-architected framework (WAF) Azure environment. We have selected some of the most common optimisations we talk to customers about. They can be categorised as the following: storage, Infrastructure as a Service (IaaS), monitoring, and Platform as a Service (PaaS).

7 ways to optimise costs Source: https://azure.microsoft.com/en-us/solutions/cost-optimization/#ways-to-optimize

IaaS

Spot VMs

Azure Spot Virtual Machines (VMs) on scale sets can help you benefit from Azure’s unused capacity at a significant cost saving. When Azure needs capacity back, they’ll evict the Azure Spot VM instances. This makes these VMs ideal for workloads that can cope with interruptions, such as batch processing jobs, dev/test environments, and more.

Shutdown or Resize Underutilised Virtual Machines

Having VMs in your cloud environment that aren’t running at their full potential or are sized incorrectly will incur unnecessary compute costs. This also includes any VMs that aren’t currently in use but are still running. So, it’s important to make sure you stop your VMs during off hours or resize them.

Reservations

A reservation can be scoped for a subscription or resource groups. By setting the reservation’s scope, you’re picking where the reservation settings apply. Based on your needs, you can choose to scope your reservation in three ways:

  • Single resource group scope: This is where the reservation discount is applied only to the matching resources in the chosen resource group.
  • Single subscription scope: Similarly, this scope applies the discount to the matching resources in a chosen subscription.
  • Shared scope: With this scope, the reservation discount is applied to suitable resources in eligible subscriptions that are in a billing context. Once a subscription is moved to a different billing context, this scope will stop applying to it.
    If you’re unsure about what the billing context is, it’s dependent on what your licensing is.
  • If you have an Enterprise Agreement, the billing context will be the enrolment. In this instance, you can include several Active Directory (AD) tenants in a shared scope.
  • If you have a Microsoft Customer Agreement, your billing scope is the billing profile.
  • If you have an individual, pay-as-you-go subscription, your billing scope will be any eligible subscription created by the account admin.

Monitoring

To centrally manage platforms, it’s recommended to use a single monitor logs workplace. This is ideal for circumstances where role-based access control (RBAC), data sovereignty requirements, and data retention policies dictate separate workspaces.

Centralised logging pushes reports about change movement, configuration, service health, and other important aspects required for IT operations. As a result, having centralised logging provides your operations management teams with the visibility they need while reducing administrative effort and chances for holes in observability.

Log Analytics offers the Pay-As-You-Go model, but it also caters to Commitment Tiers. These tiers can save you as much as 30 per cent by allowing you to commit to a tier of data ingestion for a workspace. The lowest tier starts at 100 GB per day at a price lower than what’s offered by the Pay-As-You-Go model. The Commitment Tiers provide a 31-day period of commitment from the moment a tier is chosen.

Azure Advisor

Don’t forget to take advantage of this free tool! With respect to WAF, Azure Advisor provides helpful insights to help you get the most value out of your Azure environments.

PaaS

App Service Plans

App Service plans run instances, and they act as the scale unit of App Service applications. So, if the plan is designed to run four VM instances, then every app in the plan runs on all four instances. Then, each of these VM instances is charged the same regardless of the number of applications running on them.

You can use App Service plans alongside auto-scaling to reduce expenditure. Extra costs can be saved by implementing multiple apps into a single App Service plan, so long as the plan has sufficient resources to cope with the load.

You should also consider creating separate App Service plans for production and testing as best practice. As all applications within a single App Service plan share the same VM instance, it’s not recommended to use slots on the production implementation for testing as it can negatively impact the production deployment.

Storage

Storage Account GPv2

The general-purpose v2 (GPv2) tier for storage accounts maintains the latest Azure Storage features while also incorporating the functionality of general-purpose v1 (GPv1) and Blob storage accounts.

Some cost-friendly features of GPv2 include:

  • Delivering the lowest per-gigabyte capacity prices alongside industry-competitive transaction prices.
  • Supporting default account access tiers (hot or cool) as well as Blob-level tiering (hot, cool, archive).
  • Granting lifecycle management for storage cost optimisation. As a result, GPv2 accounts are advised for most storage circumstances and are considered best practice.

Recovery Services Vault and Backup Vault

Azure contains two key types of vaults:

Backup Vault: A storage entity that holds backup data for workloads supported by Azure Backup. Recovery Services Vault: A storage entity that holds copies of data or configuration information for VMs, workloads, servers and workstations.