Cloudonomics: How to Optimize Cloud Cost

  • On January 25, 2019

Cost-optimization of cloud computing is moving from “pay for what you may need” to “pay for what your actual usage/actual need is” One size doesn’t fit all when it comes to cloud computing


It is old news that organizations are rapidly adopting AWS, Azure, and Google Cloud services. The shift to cloud is now enabling incredible business agility, scalability, and innovation. But to realize all benefits of the service the business should be prepared for a a continuous journey.

One of the main incentives for most organizations to move to cloud is the desire to reduce cost occurred by on premise infrastructure. One of the main challenges faced after moving to cloud is managing cost and that is because often organizations underestimate complexity of cloud computing.

“IT executives will get better at containing cloud costs as their best practices mature.”
CIO magazine

Cost optimization is the top cloud initiative for 2018, and yet enterprises are often unaware that they are wasting 35 percent of their cloud spentspend?, according to recent Right Scale report.

Cloud cost optimization is not a once-and-done process and to start it organizations must first identify waste by uncovering inefficient use of cloud resources.

Here is what business needs to check to cut cloud cost for immediate savings:

  • Right-sizing for efficiency
  • Leveraging reserved instances
  • Increasing elasticity
  • Cost optimization governance

Source: Right Scale 2018 State of the cloud Report


What does right-sizing for efficiency mean?

Right-sizing means achieving your best-fit cloud configuration. This includes having the optimal compute, storage, network settings and the best pricing plan. If the provisioning of your cloud resources is accurate and they match your real-world usage – that will enable you to achieve your maximum performance requirements at the lowest possible cost. Traditional on-premises infrastructure is over-provisioned and that is major reason for it not to be optimized fully in terms of cloud cost. Once you move to the cloud, you can just buy what you need at the time and provision more as you need it.


Reserved Instances – critical component toward building a better cost optimization

Reserved instances (RI) provide an organization with a significant discount compared to on-demand instance pricing. When purchase reserved instances organizations go into a long-term contract (one up to three years) they can get up to 70% of savings on their on-demand instances by choosing a combination of payment options, terms, instance type, scope, tenancy, platform that suits their need. This provisioning is supported by all major cloud providers – Azure, AWS and Google.

According to Right Scale research, in 40% of the instances cloud space is usually sized larger than required for the company workload. Over-sized cloud instances could easily be scaled down without any impact on application performance thus increasing cost efficiency for the company.

To make sure instances are the right size, it is important for companies to be application aware, and have an understanding of their performance requirements and resource utilization. Failing to understand these factors leads to over-provisioning, according to experts.

Reserved instances provide the highest savings approach – up to 75% in some cases, according to AWS. The idea is that you commit to pay for using a certain amount of capacity over a given time period, and get a discount for doing so.

Right Scale report State of the Cloud shows clear evidence that enterprises continue to run the majority of instances 24/7, which can be a source of waste. On average, they found only 31 percent variability between the highest and lowest number of instances running over a month. Experts’ advice is for enterprises to implement auto-scaling for production workloads as well as automated scheduling development environments to run only during working hours or when needed.

A case-in-point: Consider an e-commerce website running on AWS on-demand instances. Unexpectedly, it starts gaining popularity among customers. As a result, the IT manager sees a huge spike in his AWS bill due to unplanned sporadic activity in the workload. Now, he is under pressure to control both his budget and the efficiency of the infrastructure.

A swift solution to this problem is opting for instant reservation against on-demand resources. By reserving instances, he can, not only balance capacity distribution and availability according to work demands, but also reap substantial savings due to reservation.

A quick hint – ever used spot instances? If you’re serving an application or you’re performing calculations that can survive an unexpected loss of a part of the computing power behind them, think about EC2 Spot.


Increasing elasticity

Elasticity is defined as “the degree to which a system is able to adapt to workload changes by provisioning and de-provisioning resources in an autonomic manner, such that at each point in time the available resources match the current demand as closely as possible”.

In other words, elasticity means that you should use services when you need them and you should have the option to turn them off when you do not. Experts point to this kind of scalable model as one of five fundamental aspects of cloud computing.

Major cloud providers (AWS, Azure, and Google) are great examples of cloud elasticity. While each platform takes a slightly different approach to the problem, they all are able to provide services that are able to flexibly scale at a much lower cost than a dedicated equivalent platform. Moreover, they do so behind the scenes with no intervention needed by the consumer of those resources.

A Case-in-Point: Consider you are running a social network app in your US-West-1a AZ. One day you observe some spike in the workload, as your app goes viral. In such a scenario, reserved capacity and auto-scaling together ensure that the app will work seamlessly. However, during off-season, when the demand is less, there will be many underutilized resources that will be charged. A regular health check of the resource utilization and managing them to that end will provide both resource optimization and cost optimization.


Go serverless

It’s a nice thing to be able to size your EC2 resource properly – this way you can achieve greater performance and a better cost. However, if you are about to adopt the Cloud in the proper way, you should go and plan your infrastructure and applications without the VM (as we used to call it back in the days) component. AWS Lambda (or Azure Functions in the MS cloud) are managed services allowing you to run pretty much any type of code without deploying it to a server per se. That means: no need to worry about OS level maintenance and security, auto-scaling, pre-warming * and so on. That, of course, comes with a price tag, but with a careful planning a considerable saving is almost certain, when compared to having an auto-scaling group of EC2s running your code.

* Even though you’d probably want to avoid AWS Lambda Cold Start, so a certain initial effort for deploying a “Lambda warmer” would be required. Usually the CloudWatch Events “ping” method would be sufficient for this. 


Cost optimization governance – measure, monitor, and improve


“Cloud users are increasingly concerned about the money they might be wasting in their public cloud spending, but only a small percentage of them are doing something about it.”
Information Week

To ensure that they extract the full economic potential of the cloud at any scale, organizations need to constantly “measure, monitor, and improve.” Creating a culture of transparency and accountability is vital when optimizing cloud deployment.

Other important steps that organizations must take to

  • Define and enforce cost allocation tagging.
  • Define metrics, set targets, and review at a reasonable cadence.
  • Enable teams to architect for cost via training, visualization of progress goals, and a balance of incentives.
  • Assign optimization responsibility to an individual or to a team.

No matter what tools or processes organizations invest in, though, the heavy lifting is still left up to the people on the core team to ensure that they are meeting the goals they set for themselves.

Sources: Right Scale – State of the Cloud Report CIO Magazine Information Week Magazine Laying the Foundation: Setting Up Your Environment for Cost Optimization (white paper) The Road to Perfect AWS Reserved Instance Planning & Management in a Nutshell