One of the best ways to learn about the components of an Azure service and how those components fit together is by building on a tenant and taking note of how things unfold.
I keep a personal tenant for this reason; something I recommend as a learning tool. But! Just as it’s important to track costs using FinOps principles in an organization’s Azure estate, it’s (obviously) just as important to do the same for your test environment. It’s also a good way to develop the habit of analyzing and forecasting costs.
With that introduction out of the way, let me tell you a brief story to illustrate the point.
Yesterday, as part of a learning exercise (I’m trying to get a better understanding of how to apply tags to platform services such as Azure API Management) I spun up an API Management instance in my test tenant.
Then I went for a walk, had dinner with my wife, watched a movie and generally tried to decompress. Meanwhile, the API Management instance was running. It wasn’t until I was reading in bed hours later that I remembered it was there.
Was it time to panic?
It was not time to panic. From my phone, I launched the Azure Mobile App and examined the resource group’s properties:
So, now I could see that I had set the tier as Basic and the number of API Management instances at 1.
The next step was to use this information to estimate what amount of cost I was likely to incur as I slept. For this, I browsed (again, from my phone) the Azure Pricing Calculator and examined the runtime cost estimate for API Management at the SKU levels I configured:
Now I could see the following:
- At the Basic SKU level, with one running instance, the cost rate is 20 cents (US) per hour
- With no activity, the forecast runtime cost is $147.17 per 730 hours (a month)
- At a rate of .20 per hour, assuming 8 hours of sleep (with some time padding for exercises, etc.) my overnight cost would be approximately $1.60 – an acceptable spend
Oh and here’s another view from the Azure Mobile App, showing the activity log for the API Management service (another metric to use to forecast costs).
Tracking and Forecasting Costs is a Full-time Job
Using the collection of available tools, I was able to determine that my test instance of API Management would not, overnight at the level I configured, run up a crazy level of costs. Instead of guessing, I could examine, calculate and forecast which made for a good night’s sleep.
Image how much better you’ll sleep applying these techniques to your enterprise.