Cloud has been experiencing an acceleration in adoption in the last few years because of digital transformation. Then Covid-19 happened, and that has been the equivalent of injecting steroids into cloud adoption. In 2020, public cloud providers experienced a sharp growth despite the economy contracting. This was mainly due to a significant increase in remote working, digital channels consumption, and extended lockdowns (movies, online games, etc). The increased consumption often led to a “bill shock”.
Controlling cloud costs will be the focus of this post.
Let’s get to it!
I often hear we switch our dev servers off after office hours and on weekends and we have right-sized all our workloads. These are a great start but are only a skirmish in the greater cost management battle.
The diagram above highlights a holistic approach I have used to tackle cost management.
The first step in controlling cloud costs is planning. I will cover some of the key factors, but keep in mind there are many more to consider:
Requirements Gathering. Before moving a single workload to the cloud, you need to do proper sizing of selected workloads. We often over-provision resources on-premise and using that sizing for the cloud will certainly lead to overspend. You need to find out how much CPU/RAM will the application consume? How many IOPS are needed? How much storage capacity is required? What is network utilisation? You can use tools such as Cloudamize to help identify these metrics along with applications dependencies.
Cost Efficient Design. There are many factors to consider as you design applications for the cloud. For example, if you are building an eCommerce website you will need to consider compute. You can go with a virtual machine or you can elevate to containers or even to a serverless architecture. The higher you elevate your application, the more you will save on resource consumption and the less operational complexity you will have.
You also need to consider the files component. What storage tier would you go with? Will you need storage for data archiving? How cold does the data have to be before moving to the archive?
Data is another consideration. Which database would you use? For example, I have seen many clients in the past move from SQL to MYSQL as they migrate to the cloud as it is cheaper due to Linux being open-source. Evaluate if you can live without the missing features from a SQL DB.
Networking is another category to consider in the design. Will you need a private link (AWS Direct Connect/Azure Express Route) or would a site-to-site VPN be sufficient? Do you need a CDN? Azure Redis Cache/AWS ElastiCache?
All these design decisions will affect the cost.
Build a Tagging Strategy. You will need to build a tagging strategy to know which cloud resources are being consumed by which applications. This will allow you to create resource usage and billing reports.
Implement Showback and/or Chargeback. The showback model provides cost visibility inside the organisation. You will be able to show resource consumption costs to business units. In a showback model, you will have no enforcement capability. Users will know how much they are consuming, but that will not necessarily change any of their bad behavior! Other organisations will implement a chargeback model where business units are charged back for their resource consumption. You need to evaluate both models and see which is the better fit for your organisation.
Schedule Start and Shutdown of Resources. Unlike production systems, Dev and Test environment do not need to run 24/7, yet often that is the case lead to overpaying. You can automate the shutdown and start time to reflect business hours, which results in significant savings.
Finally, cost management is an ongoing process. Areas where optimisation can be achieved:
Sign-up for Discount Schemes. There are many discounts available. For example, if you have an application that you know will run 24/7 for the next 3 years, then why not sign up for reserved instances for 3 years? You can get as much as a 75% discount compared to pay-as-you-go.
Modernise Applications. Many organisation have taken the “Lift & Shift” approach to cloud migration which will hardly provide any savings. Modernisation can take many forms and today I’ll walk you through one example based on past engagement. One of the orgaisations I have worked with migrated a large number of windows based virtual machines. I suggested they consider porting applications from Windows to Linux operating system. Linux instances are significantly cheaper to run than Windows, as there is no operating system license cost.
How much was the savings?
The images above show a comparison between same sized instances of Windows and Linux in AWS. As you can see, savings ranged from 30% to over 55% and even greater for larger-sized instances. The consideration here was should the client pursue savings at the cost of the extra hassle of porting applications to a different operating system?
The CIO’s answer was “absolutely yes!”
For the majority of the applications, the process ranged from simple to medium complexity. The porting process took a couple of months and involved changing user system APIs, incompatible dependencies, and frequent application testing. However, the savings were significant, with an average of 55% savings.
Linux operating system tends to have less overhead than Windows. As a result, they could run the applications on smaller instances, resulting in extra savings.
Many organisations are looking for ways to better manage their cloud spend. Developing a successful cost optimisation strategy requires a holistic approach that starts before you set a foot in the cloud and never ends.
I hope you have found the post informative and thank you for Reading & Sharing.