AWS Compute Optimizer — Officially announced at re:Invent 2019

My take on AWS Compute Optimizer

Babylon DevRel
Babylon Engineering
6 min readJan 10, 2020

--

by Bogdan Mania, Senior CloudOps Engineer at Babylon Health

The first time I came in contact with Amazon Web Services (AWS) was around 2008. Back then the company had only been around for about 2 years and they didn’t have the constellation of services on offer like they do today. At the time EC2 was one of their flagship products and the most noteworthy service available, and that’s exactly what I used when I first started out with AWS.

As time went by, I got the opportunity to use AWS more in my work. I have always kept a close eye on new services being released and over the years their service offering has grown almost at an exponential rate. It was clear to me that Cloud Computing and “-as-a-Service” would soon become a major force and AWS was well underway in becoming a key player in the industry. I was impressed by the way AWS made life a lot easier for the SysAdmin (and later DevOps), by identifying common challenges and offering a bespoke solution for them. For example, does anyone here remember how to set up their own NAT Gateway?

Babylon Engineering at AWS re:Invent 2019

Having worked with AWS for so many years and having watched them grow over time, I have always wanted to attend re:Invent at least once in my life. AWS re:Invent is their flagship event, held in Las Vegas each year and is one of the biggest, if not The Biggest Tech Conference in the world. Attracting around 65K+ attendees, there is something for everybody. Any industry, any discipline, any field you can think of, you name it, they have it. The event takes place across 7+ locations, including hotels on the Strip like Bellagio, The Venetian and MGM Grand — you may even be walking on the same carpets as the legendary Sinatra at some point!

Together with a delegation from the Platform Team, we were sent to re:Invent 2019 to represent Babylon. I finally had the pleasure to attend my first re:Invent and was immediately impressed with the scale of it all. I was especially impressed with the efforts they’ve made towards making sure it all ran smoothly, which can be quite difficult with an event this size.

Personally, I thought the hardest part of the whole experience was choosing which sessions to attend. So much so I had to resort to flipping a coin at some point! I focused my sessions mostly around Networking, Serverless, Kubernetes (EKS), Performance Optimisation and Cost Reduction. All the sessions I ended up attending were of such high quality, I feel like I’ve learned a lot that I have since then been using in my day-to-day work.

Cost and Performance, a common challenge

Every company I’ve worked for in my life so far, have always had the same 2 requirements:

  • Reduce the cost of the infrastructure
  • Maintain the highest level of performance

At first this may seem impossible to achieve simultaneously (and for the longest time this sounded like utter nonsense to me too), but experience has taught me that it is in fact possible.

The way I used to do this in the past before analytics tools came around was very manual. Pen and paper, spreadsheets, Python scripts, manually analyzing snapshots of resource usage and monthly AWS bills… As you can imagine, this method had various degrees of success. The major problem for me, and I’m sure some of you will recognize their own situation in this, is which instance type and size should I pick for specific workloads, because over-provisioning resources leads to unnecessary infrastructure spending and under-provisioning leads to poor application performance.

Meet: AWS Compute Optimizer

At re:Invent 2019 Amazon announced a new service that promised to solve this exact problem. AWS Compute Optimizer is a Machine Learning driven recommendation service, which aims to help you optimise your resources for your workloads. During the announcement and explanation of the product, I could immediately recognise the benefits of the service while they were explaining it and I knew this was going to be a potential solution for optimising our Babylon workloads. You can watch the full session with the introduction and the benefits explained here

A short overview of AWS Compute Optimizer, as shown in the official announcement at re:Invent 2019

The Research — How does it work and does it work for Babylon?

The service itself is quite straightforward and simple. To start using it, you need to opt-in on the AWS Console. You can do this either per account or globally for all accounts associated to your AWS Root account. It’s free to use and non-intrusive, as it only analyses your CloudWatch data.

When I started the setup I began by spinning it up for one of our AWS accounts. The first (unwelcome) surprise was that Compute Optimizer is currently only available in a select few regions; North America, South America and Ireland. Although it’s quite normal for AWS to initially roll-out new services in a handful of regions, most of our resources are in the London region so finding out about this was a bit of a shame.

For the next account I tried spinning it up on I made sure it had resources in a region that was already available — in this particular case it was Ireland. The service needs to run for at least 12 hours before it can start giving you recommendations so I left it alone overnight to let it crunch the numbers.

The next day I was presented with this overview on the AWS Compute Optimizer Dashboard in the Console.

Looking at the dashboard it seems like this particular account is mostly optimised… ish. It is however quite easy to see where we can potentially save some money, as well as where we can make improvements on poorly performing workloads. Let’s now click on ‘view recommendations for EC2 instances’ to start analyzing the recommendations Compute Optimizer gave us.

Certain columns are blurred out for privacy reasons.

As you can see this overview is quite elaborate and specific. It shows you an overview including your current instance type, if you’re Under-provisioned, Over-provisioned or Optimized, a recommendation for instance type, pricing based on your current and recommended instance types and how much money you would save or spend.

Sidenote: If you have the CloudWatch agent installed on your instances, it helps Compute Optimizer make recommendations based on memory usage as well. In our try-out case CloudWatch agent wasn’t installed.

Conclusion

Even if AWS Compute Optimizer is not yet fully mature or globally available, it already promises to be an essential tool for us to improve our Cost and Performance here at Babylon. My first impression while trying this out was very good and if you are using AWS and have the same requirements of Cost reduction and maintaining optimal Performance, I strongly recommend you play around with it. The service is very focused on solving a particular problem, as well as really straightforward and easy to use. I, for one, am looking forward to using it on a day-to-day basis in my Platform Engineering operations.

At Babylon we believe it’s possible to put an accessible and affordable health service in the hands of every person on earth. The Technology we use is at the heart and soul of that mission. Babylon is a Healthcare Platform, currently providing online consultations via in-app video and phone calls, AI-assisted Triage and Predictive Health Assistance.

If you are interested in helping us build the future of healthcare, please find our open roles here.

Follow us on Twitter @Babylon_Eng

--

--