We all know that we should be optimizing our resources in the cloud, but what does that mean and how should we go about it? See what you and your whole team can do to ensure you're spending your money wisely in Azure.
One of the main benefits of moving your workload to the cloud, especially a public cloud like Azure, is not having to pay for physical infrastructure and servers you’re not using to their full capacity. But there are still lots of ways that working in the cloud can rack up costs.
Because Azure bills are typically either automatically paid by your finance department or paid upfront if you have an Enterprise Agreement, it’s easy to set your annual budget at the beginning of the year and then essentially forget about your Azure spending until your next budget meeting or report. But this can lead to big, unpleasant surprises.
Most people know it’s important to use their cloud resources efficiently, they’re just not sure how.
In fact, “optimizing existing use of cloud” is the number one cloud initiative for respondents in Flexera’s 2020 State of the Cloud Report. It was also the top cloud initiative in 2019, 2018, and 2017, which shows that cloud engineers recognize the importance of optimizing their cloud setup, but, for one reason or another, haven’t been able to make it happen.
There are lots of ways to build a lean, cost-efficient yet scalable Azure environment, so we’ve rounded up some of our top tips to help you manage and optimize your cloud costs.
This blog is the first installment of a 3-part series on Azure cost management and optimization. In this article, we’ll focus on habits that you and your team can work into your regular routine to ensure you’re making the most of your Azure spend. Parts 2 offers specific tips for avoiding unpleasant surprises in your Azure bill and part 3 covers Azure policies to implement to help manage costs.
Take control of your Azure spending—the easy way
No credit card required
Understand and predict Azure costs
Before you can control or reduce your Azure spending, you need to understand it. That may sound obvious, but it’s something that a lot of people tend to overlook or aren’t sure how to do properly.
More than simply knowing how much you’re spending, it’s about being able to identify why your bill is unexpectedly high as well as being able to forecast your future spending.
So, let’s start this with the basics.
Review your Azure billing
Whether you’re paying monthly bills or you have an Enterprise Agreement (EA), it’s important to monitor your Azure billing to ensure that you’re on track with your budget.
The electronic version of the Azure invoice can be hard to understand. It isn’t always clear how much you’re spending on what resources. And if you need to do a charge back for a resource, you’ll need more than just your invoice.
Azure has a free tool to help you gain better clarity around your spending, Azure Cost Management + Billing (ACM). And there are lots of third-party tools—like ShareGate Overcast—that can help you manage your Azure costs as well.
The cost analysis page of Azure Cost Management + Billing
With the help of one of these tools, you can typically view your spending through different scopes and filters. This can help you better understand exactly where you’re using the most Azure resources.
If you can group your costs by department, product, project, environment, or tags, you’ll get a better sense of where you’re staying on track and where you might be going over budget. If you are over budget, this kind of filtering can help you figure out why.
Maybe there’s one resource administrator in particular whose resources are costing a lot more because they keep forgetting to delete abandoned disks, or maybe you didn’t realize how much compute power the new product you’re trying to launch would require.
You can also typically view and download reports based on the scopes or filters you’re interested in. These are really helpful if your boss is questioning your business’s Azure spending, or if you need to talk to your team about resource waste and cost optimization.
Forecasting Azure costs
Once you know how much you’re spending on what, you can better estimate future costs. It’s important to get into the habit of projecting costs in the planning phase of new projects, products, or upgrades.
The Pricing Calculator's dependent on the data that you input, so if you don’t have an accurate idea of how much you’ll be spending on certain resources, you won’t get an accurate cost estimate from it.
Only pay for the Azure resources you need with ShareGate Overcast
That’s why the first step is understanding your costs before trying to forecast them. If you’re starting a new project and you’re really not sure what load your resources will have, make as good a "guestimate" as you can and then add another 10-20% margin on top, just in case.
Chances are your forecast will be off, but hopefully you’ll have overestimated the costs rather than underestimated them. It's always more fun to report savings rather than an overage.
It’s important to get into the habit of projecting costs in the planning phase of new projects, products, or upgrades. And the more you do it, the better you’ll get at guestimating.
Set Azure budget alerts
If you understand your Azure costs and have a good idea of how much you’ll be spending in the future, it’s then helpful to set budgets with alerts to help you stay on track.
ACM and other third-party Azure cost control tools let you set budgets based on the scope of your choosing.
Creating a budget in ACM
You can then decide if you want to be alerted to your spending when you reach a threshold in your budget. For example, you could say that you want to receive an alert when you spend 50% of your budget or a particular dollar amount.
Setting a budget alert in ACM
If you reach your 50% threshold for your monthly budget on the 8th day of the month, you may have to do some digging to discover why you’re spending so much more than you predicted. It could signal a problem in your Azure environment or with your estimates.
ShareGate Overcast even let you set alerts when you’re forecasted to bust your budget, so that you can proactively manage your spending rather than reacting to having already overspent.
Another way to proactively manage costs is by setting Azure policies that ensure the right people are deploying the right types of resources in the right environments. Microsoft Azure MVP and cloud solutions architect at ShareGate Stephane Lapointe (@s_lapointe) is writing a blog listing his favorite cost control policies next month, so stay tuned for that.
Take advantage of free Azure tools and pricing offers
Microsoft has several different tools and special offerings available to make Azure cost effective for its users. Make sure you’re aware of any that are applicable to your business so that you can leverage these cost savings opportunities.
Azure cost savings tools
You probably didn’t become a cloud engineer to spend hours trying to manually find idle services across all of your management groups, subscriptions, and resource groups. Thankfully, there are some great tools that can identify and recommend cost savings in your Azure environment.
Through Azure Advisor in the ACM interface, as well as other third-party Azure cost optimization tools, identify opportunities where you can save money in your tenant. Looking through these recommendations and figuring out where you can delete unused resources and where you can rightsize underused resources can be a really quick way to reduce your Azure costs.
Azure Advisor in the ACM interface proposes actions you can take to save money in Azure
In another instalment of this Azure cost surveillance series, we’re going to dig deeper into specific suggestions of how to make the most of your resource usage in Azure, so make sure to come back and check it out.
Azure best practices tools
There are also other tools, like the Azure Well-Architected Framework, which offers Azure architecture best practice guidelines to help you build a productive Azure environment. The Azure Well-Architected Framework offers a mix of advice in five areas:
- Operational excellence
- Cost management
- Performance efficiency
It provides a framework to help you develop solutions around each of the above areas, which means it’s a great tool for Azure cost management as well as other aspects of cloud management.
Azure pricing offers and licenses
Azure has different payment plans as well as special offers and licensing. Staying up to date on these can help ensure you’re taking advantage of any deals you’re eligible for.
For instance, you can use Azure’s Hybrid Benefit to save when you use your existing on-premises licenses for Windows Servers and SQL Servers through Software Assurance or qualified subscriptions. You can save up to 40% on Windows Servers and up to 55% on SQL Servers.
You can also save a lot of money by reserving virtual machine instances, which means paying a discounted price for 1- or 3-year reservations for VMs instead of using a pay as you go model. Switching to this payment method can save you up to 72%.
And the best part is that you can split a reservation into smaller parts or change the instance size flexibility even after you’ve purchased a reservation.
Azure also offers special Dev/Test pricing to ensure developers have access to the tools they need for continual growth in Azure. This includes:
- No Microsoft software charges on Virtual Machines
- Significant dev/test pricing discounts on a variety of other Azure services
- Access to Windows 10 Virtual Machines and Windows Virtual Desktop service
All you have to do is put your development and testing environments in their own subscriptions and have an active Visual Studio subscription to access resources in those subscriptions.
Instill Azure cost optimization habits across your whole team
Increasing costs in Azure isn’t always a bad thing. If your business is growing, then it’s normal that your cloud costs will grow as well. What you want to be aware of is whether or not your spending increases are warranted or are actually a sign of resource waste.
If you’re leading a team or a project, there’s plenty you can do to stay on top of your Azure spending by yourself, but proactively controlling costs works best when everyone you work with is on the same page.
Tag all of your Azure resources, always
If you don’t currently have an Azure resource tagging convention in place, creating and implementing one should be at the top of your to-do list.
Implementing a tagging convention and getting everyone on your team to use it is one of those things that’s easiest to do as you’re building your cloud environment and becomes harder and harder with each resource you deploy.
The more your business grows, and the larger and more complex your Azure environment gets, the more essential tags become.
You can create tags for any purpose, but you shouldn’t make tags arbitrarily. Tags should be relevant to how you and your colleagues work with and understand your cloud environment, and you should have a pre-determined set of standards for writing and assigning tags to make sure you’re getting the most value out of them.
For example, if some people on your team write tags with “HR” and others write “humanResources,” you’ll probably miss data when you're looking for information on the human resources department. So, make sure you have a tagging convention in place early and that everyone on your team is aware of it and uses it correctly. It wouldn't hurt to refresh semi-regularly, especially if your team is growing.
One tag we find particularly helpful when it comes to cloud cost management is the "owner" tag. If you notice that one of your resources has had a huge spike in costs, being able to quickly identify the owner of that resource allows you to start a conversation about what’s going on and how to fix it right away.
Also, knowing which developers are owners of the resources costing you the most money each month might give you insights into where inefficiencies in your team lie or which projects are on track and which are going over budget.
As we mentioned above, ACM and other third-party Azure cost control tools let you view and report on your spending based on tags. Being able to easily pivot through different views and dig deeper into how your resources are being used is invaluable. But those tags have to be in place to take advantage of that ability.
Consider which Azure regions you should deploy your resources to
Microsoft Azure’s datacenters are organized and made available to end users by region. Azure currently has regions in 140 countries across all the habitable continents (sorry Antarctica), but not all regions are built the same.
Azure has datacenters across the world. Image from Microsoft.
Some Azure regions charge differently for the same services, so you may be able to reduce your costs by deploying certain resources in a different region. Do a bit of research before deploying new resources—is there another region you could work in that would save you money?
Of course, sometimes you need to use the nearest servers to ensure the best security and speed, so you might just have to deal with higher costs. But it’s important to at least consider whether or not it would be possible or more cost-effective to do your cloud work in a different region.
As with tagging, it’s helpful to have guidelines in place for how your team will take into account and make decisions based on deploying different Azure services across Azure regions.
Evaluate your Azure resource options
Similar to the way you should consider which region to deploy to when spinning up a new VM, it’s also important that you and your whole team get into the habit of considering all your resource options before adding new workloads.
This can mean considering whether or not you need a new iteration of a particular type of Azure service, like another database, if you already have a few databases that aren’t being used to their full potential.
Is there a way to combine and consolidate some of those databases instead of purchasing a new one, or can you create a database pool to save money? Or maybe some of your databases should be rightsized so that you’re only paying for what you’re using?
Considering your resource options can also mean looking at the different types of Azure resources that perform similar functions. With storage and databases in particular, you have a lot of options. This is great if you want to stick to a budget and you can find a particular type of storage or database that’s cheaper than what you had planned on using.
But you have to remember that a different type of tech can mean a different type of implementation. For instance, the way you write the code to access your data in one type of database might be different from that for another. You may even need to adjust part of your strategy to account for the differences in this new database.
Whether you decide to go with the cheapest option, the option you're most familiar with, or the shiny new option in public preview, it’s important to think these decisions all the way through before diving in. And to encourage everyone on your team to do the same.
Microsoft regularly releases new resources and Azure regions as well as updates its tools, services, and offerings, so one of the habits you can instill in yourself and your team for cloud cost management is keeping up to date with Azure news.
Whether you listen to Azure-focused podcasts, read industry blogs, or are part of an online community, it’s important to at least get the Azure news headlines to figure out if any of the new releases or updates could help you and your team create a faster, more secure, and more cost-effective Azure environment.
Want to make sure your Azure environment is running efficiently? Our checklist contains a complete action plan for reducing Azure costs—and keeping them where they should be. At ShareGate, we managed to save 30% on our Azure bill by following these exact tips.