Top Five Tips to Control Costs in Microsoft Azure

Article Header Image

Blue is the New Green – Controlling Costs in Microsoft Azure

It’s no secret that we’re big fans of Microsoft’s Azure Public Cloud. We’ve written a dozen articles over the last few years detailing why, so there’s no need to go over all of that again here. If you want us to break it down for you, just shoot us a note and we’ll review it with you. 

When you are using any large public cloud infrastructure – Azure included – there are a few potential issues to keep an eye out for. The biggest is cost. Note that I didn’t say “price,” I said “cost.” This is an important distinction worth reviewing here for a minute.

Old-School Hosting vs Azure – a Very Brief Pricing History

We’ve been writing code and building websites since before there were any “clouds” at all. Advancing technology and innovation has a way of making a person feel very old that way.

Back in the day of dinosaur coding, websites and apps were hosted on conventional servers. Sometimes your website or app shared that server with dozens or even hundreds of other websites and apps. That means that you had to take an educated guess as to the amount of resources – RAM, CPU, disk, and bandwidth – you were going to need. Hosting companies sold hosting service plans based upon different levels of those resources. If you guessed too little, your app would run out or resources and stop or the hosting company would let you “burst” to higher levels at a much higher cost. Order too many resources and you paid through the nose every month for resources you never used. 

One of the super benefits of cloud technology – and Azure in particular – is that you have flexibility and scalability. You can set your resource utilization to whatever level you want and either hard-throttle it to ensure that you never exceed those levels or allow the resource consumption to go up and down as needed at the time. This is great in theory, but as any software engineer will tell you, things can happen – code can run wild, spiral into loops, leak resources, get hammered by attacks or malware, or any number of other things that can drive resource utilization up dramatically.

And since the Azure cloud charges by the unit of resources actually used, this can also drive up costs. When that happens unexpectedly, it can make for some unpleasant invoices that need to be paid at the end of the month. The unit “price” can be great, but not if total consumption raises overall “cost.”

Azure Cloud Cost Management is Simply Good Business Practice

It’s not just accidents and code faults that can cause cloud costs to rise. Once you understand how Azure billing works, there are some things you can do to keep the normal, everyday costs lower overall. Besides … getting accurate estimates and managing costs is always a solid business practice. 

Estimating Azure Service Costs for Your Websites and Applications

Estimating Azure costs has become a LOT easier. It used to be that list pricing was inflated and then customers negotiated specific discounts on consumption rates. But that was a pricing model born in the last century and it just didn’t serve the current dynamic and globally distributed market. Today, Azure posts list prices online in a rather egalitarian way, and they are competitive. So, in this respect, it has become a lot easier to calculate monthly costs.

But there is a myriad of services and resources available on Azure these days – from virtual machines and SQL Databases as a Service to Kubernetes and blob storage and beyond. And admins can mix and match resources in an almost infinite number of different ways. Fortunately, Microsoft has created an Azure cost estimation tool where developers and project managers can enter in some basic parameters and get a pretty good idea of what things might cost.

We’ve helped a lot of customers walk through the process to set their quarterly and annual budgets. As official Azure Cloud Service Providers (CSP), for some customers, we manage their entire Azure experience. So let us know if you need any help.

Top Five Tips to Control Costs in Microsoft Azure

There are several special Microsoft promotions and programs that can sometimes reduce rates in Azure. But these often have volume minimums or special requirements to qualify and most are limited in time. Since we are focusing on real, scalable cost savings in business and enterprise production environments, we won’t cover those programs here. 

There is also a lot of “code in the weeds” things you can do to reduce Azure costs too. But those are topics best discussed on a case-by-case basis (let us know if you need a consult on that). We’re going to turn our attention to the business side to deliver five overall management ways you can effectively control your costs in Microsoft Azure.

Manage Azure Regions for Price Optimization

As of this writing, there are 54 Azure regions around the world serving 140 countries – and they’re adding new ones all the time. There are often differences in rates between the different regions. For example, the rates for Azure regions in or near Washington DC are often higher than they are in Midwest regions, and US-based regions are nearly always less expensive than those in Australia. You can arbitrage these differences to keep your costs under control.

One of the primary benefits of distributed public clouds is that the impact of geographic location is lessened. Sometimes “where” your cloud is located is important – sometimes it doesn’t matter that much all. If you have geographic flexibility, take advantage of it to cut down your monthly costs.

Application Performance Saves Money, Always

When you are running applications on a physical server, you usually configure the server to have more resources than you actually anticipate needing. There are lots of good reasons for that, but one of the not-so-good consequences is that there is less incentive to ensure that an application is operating at maximum efficiency since there is no incremental cost.

In Azure – as in all public clouds – the opposite is true. The more efficient your application the fewer resources it uses, and thus the lower your running costs. We’ve squeezed a lot of savings out of production enterprise applications while boosting the speed at the same time. And if you are in the business of technology, when you lower costs AND increase speed you feel like a hero.

Application performance testing, profiling, and transaction tracing should become a regular part of your business practices.

Implement a Content Delivery Network (CDN)

This is not applicable to every website or application, but when you have static files, images, and pages they can usually be cached in a CDN. This can take a huge load off of your Azure account. The de-facto industry standard for CDNs today is CloudFlare, and it is very cost effective. Azure has a limited CDN offering – and it works fine for some applications. But services like CloudFlare off-load a lot of work from the Azure instances, and that can save money.

Use Azure DevTest Labs

Each month, literally millions of dollars are wasted in public clouds when services are left running needlessly. Microsoft is focused on being developer and business-friendly – they want your experience to be a good one and to remain competitive. They provide a lab environment that runs lean versions with low costs and pre-set auto-shutdown timing. This means that your team can spin up and run low-cost test environments and those virtual machines (VMs) will “remember” to turn themselves off based upon your settings.

Money = saved.

Report, Review, Revise, and Save in Azure

The most important cost-savings tip in Azure is awareness. When costs are coming in as monthly invoices and being auto-paid from the tech budget, it’s easy to lose track of whether that money is being optimized. So, the number one thing to remember is that proper reporting and management are vital. 

There are a number of services available to help with this. But Microsoft has stepped up again to provide a solution – Azure Cost Management. This service came into public preview just a few months ago, but the results are promising. It allows businesses and technology professionals to monitor costs in near real time and make corrections via a convenient dashboard. 

More Ways to Save Costs in Azure

As we said, there are a ton of additional ways to save money on your monthly Microsoft Azure bill – things like identifying slow web requests, deploying auto-scaling, using Azure App Services, and so on. They can impact costs is a positive way, but they are more technical and not applicable to every application. If you need help reducing your monthly cloud costs, just let us know. We’re happy to see what additional cost savings are available to you, your team, and your organization.

Thanks for reading.


Azure Links and Resources

Microsoft Azure Price Calculator
https://azure.microsoft.com/en-us/pricing/calculator/

Azure Cloud Pricing
https://azure.microsoft.com/en-us/pricing/?v=18.43

Azure Regions Locator
https://azure.microsoft.com/en-us/global-infrastructure/regions/

Azure DevTest Labs
https://azure.microsoft.com/en-us/services/devtest-lab/

Azure Cost Management
https://azure.microsoft.com/en-us/updates/introducing-native-azure-cost-management-preview/