16 January 2020 | Peter Vaihansky
Key Ways to Optimize Cloud Spending
In the 2019 State of the Cloud report by Flexera, 84% of respondents said that managing and optimizing cloud costs is a growing concern, while 64% highlighted it as their number one priority.
Moreover, respondents estimate that close to a quarter of their cloud spending is waste. Other estimates put that number closer to one third - and either estimate is unacceptably high.
Here are some of the key ways to reduce waste and optimize your cloud spend.
Rightsize your infrastructure
Controlling your cloud spend requires a thorough understanding or how the leading cloud platforms like Microsoft Azure, Google Cloud Platform, or AWS price their services. For example, you have an incredibly broad choice of virtual machine images to choose from. Understanding which paraments drive cost the most (CPU vs. memory vs. storage) will help you avoid spending too much on overpowered VMs. Another variable that impacts your bill is how outbound data transfers are priced vs. data ingress traffic (although this point has more to do with the application architecture than rightsizing per se).
Shut down unused resources
We have all heard the key marketing message of the cloud: “Only pay for what you need!”. In reality, you pay for what you forgot to turn off. Cloud resources are so easy to provision that people, well, do it a lot, sometimes with abandon (think kids and candy shops). But if you forget about the VMs you spin up, you will continue paying for every second that they are running, whether you are using them or not. It has certainly happened on my projects, and I’m sure on yours too (and if it hasn’t, chances are it will). Catalog and watch what you have provisioned, figure out if you have resources that are unused or unattached, and shut them down.
Take advantage of built-in discount options
Leading cloud platforms offer a variety of discount options that can provide significant savings.
The on-demand pricing tier is the most expensive, and there is no reason to be using it for all your cloud needs. By using Reserved Instances, which are a great fit for workloads where you are able to predict demand over long periods of time, you can often save from about 30% up to 50% off the on-demand prices. Interestingly, according to the aforementioned report, less than half of Azure and AWS customers are taking advantage of reserved instances.
Furthermore, megascale cloud providers have significant amounts of unsold inventory of compute capacity at any given moment, and they are willing to let you have it at a steep discount of 80% to 90% off the on-demand price. (Think airlines offering unsold seats on flights at steep discounts to avoid flying empty planes.) These are called Spot Instances on AWS, Low-Priority VMs on Microsoft, and Preemptible VMs on GCP. The caveat is that these resources can be taken back when the cloud provider needs them, with only a minimal warning. However, If you architect your applications to be fault-tolerant and stateless, you can automatically stand up other instances to pick up the slack.
Understand your usage patterns and automate optimal provisioning
Unlike on-premise resources, where you have to provision for peak demand and run at low utilization most of the time, in the cloud you can scale provisioning up or down based on real demand. Understand how you are using your cloud infrastructure over time by building heat maps and dashboards. For example, if you have development and testing environments that are idling on the weekends, you can safely shut them down and spin them back up before your teams come in on Monday morning. There are a plethora of tools on the market that can help you with monitoring and automated provisioning, including across multiple providers.
Cost vs. Value
Finally, it’s not all about cost. The most powerful story of the cloud is not the cost story, it’s the value story. While people may initially want to go to cloud for the promise of cost savings, they stay for innovation and agility. I firmly believe that cloud is not about doing the same thing you were doing yesterday but cheaper; it is about doing things you simply could not do before.
Business agility - the ability to create new or change existing technology quickly and safely - is what cloud is made for, and why you should be in the cloud.