Which cost optimization best practices are standard to Azure, AWS, and GCP, and how does Azure differentiate itself from the rest in terms of saving customers money?

Here at DoiT, when working with multicloud customers, I inevitably get loads of questions regarding cost optimization strategies and how different they are from one Cloud provider to another. I truly empathise with customer concerns: if managing costs for one hyperscaler is difficult, having two or more to deal with is a major complexity and you’d like to find a common thread across all of them.
So this got me thinking: how about we share some minimum common denominator strategies applicable to all hyperscalers and then dive into one of them to highlight its specificities.
In this post, we’ll start our journey into Azure cost optimization, starting from the best practices applicable across all the big three: AWS, GCP, and Azure. We will then dive into three peculiar features that only Azure provides and require minimal customer effort while yielding potentially huge savings.
The Big Three: Similarities in Cost Optimization
While AWS, GCP, and Azure teams will invest time and money to highlight the differences in their services, some cost optimization principles will apply across all of them. After all, cloud adoption is driven not only by features and capabilities but also by efficiency, and customers have clearly shown in the past few years that they demand more visibility into their costs and more opportunities to reduce them.
The FinOps Foundation, for example, is driving a somewhat standardized approach to how to analyze cloud costs and how to hunt for inefficiencies. If you’re interested in learning more about their work, go check them out here https://www.finops.org/
But let’s not digress. Whether we are approaching our very first migration to the cloud or running on it since SimpleDB was a thing, let’s now dive into 3 of the core cost optimization principles that apply to AWS, GCP and Azure alike.
1. Rightsizing Instances
The concept of rightsizing is a classic trope of the cloud: making sure that customers use resources that fit their/ needs, no more, no less. As for the vast majority of choices in the cloud (and life) the size of your resource (whether it’s a managed DB instance, a container, a pod, a VM, a file system, etc..) is a trade-off between what you need now, what you might need in the future and how fast you will need it.
All hyperscalers will interweave billing data with operational metrics (like network, memory or cpu utilization for instances, for example) to build a case for reducing the size of the resource or even deleting it completely, providing an estimate of how much you’ll be saving.
Azure does not shy away from providing customers its recommendations through Azure Advisor, which, similarly to AWS’s Compute Optimizer and GCP’s Recommender will provide suggestions on how to rightsize resources or delete idle ones.
Do not skip looking at those recommendations: you’d be surprised how many resources could be deleted. Later in this article we’ll dive deeper into some extra capabilities Azure provides so stick around.
2. Reservations
Prepaying for computing resources over a fixed amount of time commitment reduces costs significantly across all clouds. Across all hyperscalers, this purchasing method is available for a wide range of services (Compute, Storage, Databases..). While it might look daunting, it’s the fastest way to save money in the cloud: no configuration changes, no re-architecting, just a few clicks and the price per unit of your resource drops dramatically.
Azure does provide a Reservation Recommendation API as well as surfacing subscription-level recommendations through Azure Advisor; however, if you want to see recommendations for your entire billing scope (as you should, to maximise utilization of the Reservation), they have a slightly clunky way to provide that to customers: in the Azure portal go to Reservations > Add and there you’ll find all the services to which reservations apply to and their recommendations.
If you ask me, I find AWS and GCP portals easier to use, both providing reservation recommendations for eligible services in a single place, without the need to click around. However, let’s not focus on the cosmetics here: the important thing you should do is analyze those recommendations and apply the ones that fit your use case as soon as possible. https://azure.microsoft.com/en-us/pricing/offers/savings-plan-compute
3. Spot Instances
If you’re running workloads that can tolerate interruptions (think testing and sandbox environments, batch jobs, async processing), all three platforms have spot instances available. The core idea behind spot instances stems from hyperscalers having excess capacity in their data center: instead of idling, they will allow customers to use that extra capacity at a steep discount. In AWS and Azure customers are allowed to even set a maximum price they’re willing to pay for such VMs, giving them a lot more control over their costs.
Suppose there’s more demand for capacity in the Availability Zone. In that case, the spot price will increase, potentially passing the customer’s threshold. In this case, the cloud provider will initiate the eviction process, effectively shutting down the VM. Customers have the option of retaining the VM and its disks (and getting charged for them), waiting for the price to come down again, or simply deleting it, terminating all charges.
Azure provides Spot Virtual Machines supporting maximum price setting and eviction behaviour, but notably, B-series machines and promo sizes are not supported, customers can even deploy Virtual Machine Scale Sets for Spot VMs combining SpotVMs with automated scaling, further reducing the risk of bill shocks due to excessive scaling.
How Azure Is Different
We discussed some common approaches to cloud optimization that are valid across hyperscalers but what about Azure’s specificities? Does Azure have some unique benefits we might be exploiting to get our costs even further down?
1. Azure Hybrid Benefit: Play the BYOL Card
DoiT customers pay millions of dollars per month in Windows license fees when running Windows workloads on AWS or GCP but customers who already have a Windows license agreement with Software Assurance might leverage the Azure Hybrid Benefit: it lets customers bring existing on-premises licenses for Windows Servers, Microsoft SQL Server and Linux products to cloud deployments.
Now, I know that’s not the most exciting topic in the world but it’s important to note that this program allows customers to effectively reuse their on-premise licenses for their resources in Azure, providing a massive discount in the process. While AWS and GCP have struck agreements with Microsoft allowing customers to bring their own licenses when using Microsoft products in their clouds, Azure Hybrid Benefit brings the total costs significantly down (sometimes even by 85%). Learn more at this link
2. Dev/Test Pricing
In a unique move, Azure provides special pricing for non-production environments (Dev/Test pricing) through its Enterprise Agreement programs. We mentioned above how Spot VMs can be used to reduce costs for testing environments but effectively that strategy is limited only to Azure VMs. With Dev/Test Pricing a wide variety of services are covered, including SQL Database and App Service, reducing the TCO of testing environments significantly. If your team uses Azure DevOps or MSDN subscriptions, ensure you spin up VMs and services in the Dev/Test pricing tier where applicable.
3. Activate Dynamic Scaling for Azure Cosmos DB
This one might have flown under the radar, especially if you’re a long time user of Azure Cosmos DB. Since September 2024, Microsoft has changed the way Cosmos DB scales its databases by allowing Dynamic Scaling.
Previously, scaling was triggered by the most active region or partition: on the surface that’s welcomed behaviour but when your database sees uneven workloads, where one region or partition is under significantly more pressure than others, this behaviour fosters unnecessary and expensive scale-ups.
Now, Microsoft will bill multi-region databases on a per-region basis, not based on the most active region as before. Furthermore, scaling now happens per partition effectively allowing customers to get a more precise billing for their patterns.
Actionable Tip: if your Azure CosmosDB account was created after September 25th, 2024 you don’t have to do anything, it is enabled by default. For accounts created before that, you can enable it by following the instructions at this link .
So, now that we learned what best practices are common to AWS, GCP and Azure and how Azure has some aces up to its sleeve to make our cloud investments more efficient, what would be your next step? Reach out to DoiT of course at doit.com/services😊