Have Cloud Sticker Shock? Here Are 5 Steps To Manage Cloud Costs
Cloud isn't always cheaper than on-prem, a lesson that many organizations find out the hard way. Keep your cloud bills in check (and the C-suite happy) using these guidelines.
- By Joey D'Antoni
One of the early beliefs about cloud computing was that it would drive significant cost savings compared to traditional on-premises computing. You would no longer have to rent or buy datacenter space, and have I talked to you about the costs of enterprise-class storage?
In reality, particularly in the early phases of cloud adoption, the costs will be the same or, in some cases, even higher. The scarier part is those costs all come on a single invoice rather than being spread across several vendors' invoices, which places greater emphasis on the cloud bill's sum.
Recently, I had the opportunity to teach the engineering staff at a large client how to better manage their costs. Here's some of what I learned in building that course.
1. Build Your Budget -- And Then Monitor It
One of the things I always tell customers is that I can provide them a decent estimate of what their initial cloud costs are going to be, plus or minus 20 percent. That's a big variance.
The reason for that is there a number of variable costs associated with cloud services. Some examples are accessing object storage (S3 on Amazon Web Services, Blob storage on Microsoft Azure) or network egress (data into the cloud is nearly always free, but data out of the cloud is nearly always paid-for), which can vary depending on your cloud usage. It is important to understand which of your costs are variable.
While there are not absolutes, virtual machines (VMs) and VM storage are fixed costs. "Fixed cost" means no matter how much you use your VM or its storage, the hourly cost will be the same (deallocating your VM can obviously reduce your monthly cost).
Platform-as-a-service (PaaS) offerings like databases and Web services may have fixed costs or they may be variable, so it is very important to understand their pricing model. Variable pricing is not inherently bad. We switched all of our internal demo Azure SQL databases to a variable pricing model, which saves us a lot of money because they are infrequently used. If you are using a lot of cloud services with variable costs, you should ask your vendor or partner for some sample usage data from other customers so you can get a better expectation of costs.
2. If You Aren't Using It, Turn It Off
This may seem basic, but something I encounter all the time is systems running 24/7 but support work that only occurs during business hours.
Obviously, there are critical production systems that need to run all the time, but for lower-tier systems, you can take advantage of the flexibility of cloud computing to reduce your costs. Azure VMs have an automatic power-down functionality, but if you want to automatically power them on, you will need to build a bit of automation. You can even build some smart automation based on tagging, which allows your automation to be smarter about which resources to shut down, and can let you flag resources that need to remain online.
Another trick I've learned is to lower the tier of your VM storage when the VM is powered down. While powering down mostly applies to VMs, some PaaS solutions include options to pause, either manually or automatically.
3. Label It
Both Azure and AWS support rich tagging of all resources. Tags are simple key-value pairs that can be used to label resources. For example, you might have "Environment:Prod," "CostCenter:HR" and "24/7:Yes" tags on all of your resources.
While this may seem trivial, tags cascade down to your bill, which allows you to do a rich analysis of what applications' costs are responsible for your overall cloud bill, and which teams to work with to reduce those costs.
Beyond your bill, you can also use tags to drive automation processes as mentioned above. I have an automation job in my Azure account that checks for a tag pair of "Use:Demo," and then takes action to power down and lower the storage tier of those VMs. You can leverage tagging to do some advanced scripting actions that can help lower your costs.
4. Mind the Outliers
There are several cloud services that are just expensive. They represent a lot of computing resources and include software that raises additional costs. A couple of examples are managed Hadoop and Spark services on both AWS and Azure. There are other expensive resources like very large VMs or very high-throughput storage that can make up a major percentage of your cloud bill.
While these compute resources may be needed to manage large workloads, they may also represent chances to optimize performance by writing better code.
5. Use the Right Storage Tier
Cloud storage takes two forms. VMs typically have their own storage that functions more like a traditional SAN. Then there is object and file storage.
File storage acts like a traditional file server and can be accessed as such. However, it typically comes with a higher price tag. In Azure, file storage costs twice as much as Blob storage. Blob storage typically requires programmatic access. While you can drag and drop files into the portal, typically the service is used by an application to retrieve and write files. While this requires a little more work, the cost savings compared to file storage are large.
Beyond the type of storage you choose, you should pay attention to the tier you are using. Both AWS and Azure have hot, cold and archive tiers that provide different rates for usage and storage. For example, archive storage has very low storage costs but very high retrieval costs, so you want to use it only for files that are infrequently accessed.
For IT professionals who are not used to worrying about the prices of their technology stack, cloud pricing can be an overwhelming addition to their workload. However, managing cloud costs is a key component of an IT professional's job in 2021.
The other benefit of having computing costs clearly quantified is it allows you to quantify your contribution to the organization, which can be helpful in an annual review.
Pay attention to your costs, build a budget and keep going back to best practices as they can change quickly.
Joseph D'Antoni is an Architect and SQL Server MVP with over a decade of experience working in both Fortune 500 and smaller firms. He is currently Principal Consultant for Denny Cherry and Associates Consulting. He holds a BS in Computer Information Systems from Louisiana Tech University and an MBA from North Carolina State University. Joey is the co-president of the Philadelphia SQL Server Users Group . He is a frequent speaker at PASS Summit, TechEd, Code Camps, and SQLSaturday events.