Microsoft Azure is billed based on actual usage on a per minute basis. This is the default pay as you go model, but it's not the most cost effective.
Let's take one of the most popular virtual machines we see in the use across our customer base, the D4s v4. This is an average server with 4 CPUs and 16GB RAM with support for premium SSD disks. It also includes a Windows Server licence.
The cost to run this server is 31 pence per hour, or £226.37 a month if it's on 24/7.
The screen shot above is taken from the Azure Calculator, a great tool to price up services in Microsoft Azure.
Saving Money on Azure
We can bring the monthly cost down of this server in two ways.
This is a commitment to this specific size of machine for 1 or 3 years. Effectively, you sign up for a longer-term commitment to the server and benefit from a reduced price.
You can still pay monthly, but you're committed to paying regardless of whether you're using the server or not.
It only makes sense when you know the workload of the server is going to be consistent for the duration of the 1 or 3 year commitment and the server is on all the time.
In our D4s v4 example the cost is reduced as follows:
1 year = £174.74 (41% discount)
3 year = £148.18 (62% discount)
Microsoft offer this incentive so that they can better plan and forecast data center capacity requirements.
When you create a new Azure server, it typically includes the cost to licence Windows. This is great in that you don't have to worry about it, you can be up and running without any complicated Microsoft licensing issues!
However, it's not the most cost-effective way. By removing the Windows licence from the server, the monthly cost is reduced from £226 to only £126.
Of course, unless you're planning on running a Linux server, you still need to ensure you are correctly licenced for Windows. We do this by purchasing a 1-year Windows server licence at a cost of £556 - and I think you can see where this is going.
Over the course of the year, we have the new monthly cost of £126, plus the annual Windows licence cost of £556. Which totals £2,068 for 12 months of 24/7 operation.
On the pay as you go licence price of £226 a month, it would have cost £2,712 over 12 months, so you're getting a saving of £604 per year.
The only downside to this is the upfront payment of the Windows licence, but if you can spend that £556, you'll save more than that over the year.
Combine it all to save £££
Our example server was originally £226 a month. If we add a 3-year reserved instance and a Microsoft Windows licence for 3 years we can significantly reduce the costs.
That's a massive saving of £5,294 on a single server over 3 years. My workings are below, if you don't believe me!
Pay as you go
£226 a month * 36 months = TOTAL £8,136
Reserved with separate Windows licence
Monthly costs £48 a month * 36 months = £1,782
Windows licence for 3 years £1,114
TOTAL = £1,782 + £1,114 = £2,842
Note, pricing does fluctuate in Azure, these calculations were correct in June 2021.
Other ways to save
If you don't mind where in the world your Azure server is located, you can create your server where it cheapest to run. This tool will allow you to see where you can run your server for the cheapest amount per month.
Ditch the server altogether - you can run many services on Azure without a server. This can remove an entire layer of additional costs.
Azure services are charged on a pay as you go basis, so the quickest and easiest way to avoid paying for a service is to turn it off. In the case of our virtual machine, it may only be used during business hours and on weekdays, so outside of those hours we could turn the machine off, eliminating almost all of the cost (you still must account for the storage costs, however).
It's possible to schedule this too, so you can have your server automatically start up at 8am and shut down at 6pm. You can also scale services in more advanced configurations, you may have a service loaded across several servers, you can shut some of them down during quieter times but still have a scaled back version running 24/7.
If you need some advice for cost savings in Azure and the most cost-efficient way of running your services, please don't hesitate to get in touch.