Our team went all in in when we went to the cloud, and with full access to the accounts and the cards registered to them we gladly started shopping around trying out X and Y on Azure. Before we knew it we were looking at a sharply sloped graph, pointing straight to heaven were apparently the money was flying. Needless to say, we soon took action, and we certainly learned a thing or two about managing costs on Azure. I’d like to share them with you. Here are my top ten:
- Use subscriptions to define cost areas
For example, one for Dev, QA, Prod etc. Azure gives a lot of details in terms of cost which gives in turn gives you a lot of control. This also helps with setting prices for customers, and you could define price tracks this way.
- Delete what you don’t use
Since it is rather easy to set up services and resources you easily end up with many of them while not deleting what you are not using anymore.
- Monitor costs with a dashboard
The dashboards on Azure are very handy and a clever way to use them is to create a cost dashboard where you can pin information about your spending. If you have divided the resources by subscriptions that define cost areas then you can also easily compare and detect deviations by a quick glance.
- Start small, scale later
Buy the rights size while staying on the cautious side. It’s easy to scale resources and if you aren’t habituated with Azure it’s hard to know exactly how much you will need of everything. It’s different than running in a private cloud or local physical machines.
- Deallocate when not in use
Simply turning of a VM isn’t enough if cost saving is what you are going for
Turn of what doesn’t need to be on. Make sure you deallocate, not just stop from the VM. This can also be scheduled if you know your usage pattern.
- Wait with the extras
You don’t always need the ‘extras’, so make sure you need it before you buy it. An example would be streaming application insights data so you can do continuously export. If you don’t use the data frequently and don’t need historical tracking you might be okay with just application insights alone.
- Estimate and compare costs
Azure tries to be as transparent as possible with costs, even though it’s not always that straightforward. With the pricing calculator, you can estimate the costs of your resources and services, and after export use excel to compare.
Be aware that the Microsoft Azure Cost Estimator Tool that used to exist as an executable you could download and run is deprecated. Microsoft warns against using it as the prices will be incorrect. Instead you should use the pricing calculator.
- Use Azure Usage and Billing Portal
Pinning subscription costs to a dashboard helps give instant overview, but not enough details. The Azure Usage and Billing Portal that was recently open source gives you fine/grained overview so give it a go.
- Set up billing alerts
I learned the hard way what happens when you forget something on and you don’t log in to the portal for a while. After an Azure bootcamp where I had given a workshop in some new services
And left them churning overnight, only to wake up to a juicy bill. The first thing I did was set up billing alerts.
- For the rest use REST
There is REST API for billing that you can use to integrate the data with other analyzing tools, for example Qlikview or Power BI. and more. I haven’t tried it myself, neither has the company I work for, but I’m glad the API exists and I will use it in the near future to better track costs vs data.
There are many more ways to save money, and of course a good start is to always write efficient services, queries and database schemas. But I’ll save that to a separate post on efficiency and Azure and leave you with the above ten tips.
Hope you’ll find value in them, and please share advice and resources you’ve come across on your journey.