Hosting workloads in the public cloud offers far greater flexibility than on-premises hardware. Azure virtual machines allow you to take advantage of the elasticity of cloud computing to save money while optimizing performance and availability.
But it takes some effort to achieve those savings.
Azure VM pricing varies dramatically according to multiple factors, some more obvious than others. There's a surprising amount of layers and variables involved in understanding exactly what you should be paying for a virtual machine that suits your requirements.
One you've gone over the following steps, you'll have a good understanding of how Azure VM pricing works and what you'll need to consider when it comes time to purchase.
- Pick the right type (series) of VM for your needs
- Choose the most cost-effective pricing plan
- Leverage available discounts
- Account for associated services
Choose the right VM series for your needs
Microsoft offers a variety of virtual machine sizes in Azure, which are grouped into 'series', to accommodate for a broad range of use cases.
They fall into five main categories:
- General purpose
- Compute optimized
- Memory optimized
- Storage optimized
- GPU optimized (for graphics-heavy workloads such as rendering and video editing)
Here's a chart comparing the major VM series and their starting prices. Take the time to familiarize yourself with the different options; it might be a dry read, but it could save you a ton of money down the line.
Azure VM series comparison chart
|VM series||Type||Typical use cases||Price starting at|
|A-series||General purpose||Dev and test environments||$14.96 per month|
|B-series||General purpose||Workloads with typically low usage and occasional spikes|
|DC-series||General purpose||Workloads with high data security requirements||$62.61 /per month|
|E-series||Memory optimized||Relational database servers, in-memory analytics, caching||$117.74 /per month|
|F-series||Compute optimized||Analytics, web servers, batch processing, gaming servers||$45.79 /per month|
|H-series||Compute optimized||Large-scale modelling and simulations (e.g. weather modelling, quantum simulations)||$743.79 /per month|
|Lsv2-series||Storage optimized||Data warehousing, transactional databases, NoSQL databases (e.g. Redis)||$583.07 /per month|
|M-series||Compute optimized||Large in-memory workloads (SAP certified for SAP HANA and OLAP)||$1,435.71 /per month|
|N-series||GPU optimized||AI, deep learning, video editing, simulations||$840.96 /per month|
Pick the most cost-effective pricing plan
In line with the flexibility you get from virtualization, Microsoft offers two main ways to pay for Azure VMs:
Pay-as-you-go VM pricing can be likened to a taxi meter: you pay only for the time and resources you actually use. In PAYG scenarios, Microsoft will compute the capacity that you use by the second. If you decide to stop using the service, you can easily do so at any time. There are no long term contracts to sign and there are no upfront costs.
You can also add more capacity as you need it, or stop paying for capacity that you don't use.
When to choose PAYG pricing for your VMs
- Applications and workloads with unpredictable utilization patterns that can't be shut down
- Proof of concepts for apps running on Azure for the first time
- Small environments and one-off projects with minimal services
If pay-as-you-go is like riding a cab with the meter on, purchasing a virtual machine reserved instance is like renting a car for an entire week. In a nutshell, you commit to leasing a virtual machine (or set of virtual machines) for a set amount of time—1 or 3 years—and pay for it upfront.
If you already know that you'll be needing your VM for a longer period of time, it's almost always a good idea to pay upfront. Judicious use of reservations could save you up to 72% compared to PAYG pricing.
When to use reserved VM instances
- For workloads with predictable utilization patterns
- For permanent and long-term applications and services
Things to know about Azure VM reservations
- Reservations can be applied to both Windows and Linux VMs, but the way the discount applies varies slightly in either case.
- Reservations apply to your VMs' compute costs. Network and storage costs will be charged at the standard rate.
- In most cases, reservations cover the infrastructure portion of a VM's cost.
- Reservations don't just apply to the VM deployment itself, but also to certain services running on the VM. When purchasing a VM, the services affected by the discount will be determined by the instance size flexibility setting you select.
Leverage available discounts
In addition to the different VM series and pricing plans available, you can also apply discounts to further optimize the price you end up paying for your Azure virtual machines.
- The Azure Hybrid Benefit is an additional discount offered for those who have on-premises SQL Server or Windows Server licenses. You will pay a lower rate when migrating to Azure virtual machines, Azure SQL Database, or SQL Server on Azure.
- Another option you should be taking advantage of as much as possible is Azure's DevTest pricing. Combine that discount with your A-series dev/test VMs for ultra cost-effective non-production environments.
Here's a price comparison for a general-purpose Azure VM with two virtual CPUs and 8GB of RAM. As you can see, reservations and discounts can really make a difference.
|Standard price||Discounted price|
|Pay-as-you-go||$0.188 per hour||$0.037 per hour|
|1-year reserved instance||$0.1468 per hour||$0.055 per hour|
|3-year reserved instance||$0.1289 per hour||$0.096 per hour|
Account for related resources
In addition to the above, keep in mind that Azure virtual machine pricing isn't just about the VM. You're also paying for storage, disaster recovery and backup options, replication, IP addresses, and other related services and resources.
Let's take a closer look at some common VM add-ons that'll impact pricing:
- Virtual hard disks. The cost of virtual hard disks is not included in your Azure virtual machine fees. This is one of the more significant add-on costs when you get an Azure VM.
- Networking. Every appliance that you put on your virtual machine will need an IP address, and that will cost you. Things like VPN gateways, web application gateways, and a load balancer will have its own IP address.
- Backup. On Azure, there are two charges for backup. The first is for blob storage where your backups are to be stored. Then you also have the instance charge that will roughly cost around $10 per instance (which amounts to 50 GB to 500 GB of backup). If you have less than that range, you are charged for half an instance. If you consume more than 500 GB, then you will be charged for multiple instances. For example, if you have 1,000 GB of disks, then you will be paying for two instances.
- Disaster recovery. You will also need to add disaster recovery. You have to pay for Azure to replicate your VMs and store the copy in another region. You pay for the virtual machine disk storage cost and the processing fee. Azure's Site Recovery service also charges for every replicated machine.
- Administration and management. Azure will charge you if you use Azure Monitor, Network Watcher, Log Analytics, and Security Center. Each of these modules can be used to manage your VMs.
Understand service pricing to maximize your Azure spend
When it comes to choosing the right Azure VM, familiarizing yourself with the complexities of service pricing can pay off. To get the best price for your VMs, make sure you:
- Choose the right VM series for your use case
- Pay up-front for a reserved instance whenever possible
- Take advantage of available discounts such as Azure Hybrid Benefit and DevTest pricing
- Account for all related services that will be incurring costs on your VM
Want more tips?
Looking for ways to save money on Azure? The Ultimate Azure cost optimization checklist for cloud teams has just what you need.