Cutting costs

What to do when you find that the cloud provider's costs eat up most of the profit?

Project overview

CLIENT

NotifyAI

INDUSTRY

Advertisement

LOCATION

United States

TIMELINE

05/2023 - 07/2023

Task

The Solution

After the audit, it turned out that we were dealing with a greatly overscaled infrastructure whose resources were not fully utilized. We also found a lot of low-hanging fruit that, when repaired, brought immediate results.

Technology used

ansible
bitbucket
digitalocean
docker
terraform

Golden AMI

It is worth making sure that the AMI contains only what is really needed. In this case, the EC2 image contained archives and logs that were copied to the newly created instances. It is worth adding that the number of EC2 instances was in the hundreds.

 

Auto Scaling groups

After analyzing the metrics, we found those that better describe the system load and allow for a more accurate estimate of the required resources. We further strengthened the result by replacing the SPOT instance types with more fitting ones.

JVM

We launched profiling at the JAVA virtual machine level, and based on this, we determined where the application bottlenecks were. We determined that switching to a newer version of JAVA should solve the problem, and with the developers’ help, we delivered this.

 

Everything in the code

We delivered everything we worked on in the form of Terraform and Ansible code and wrapped it in pipelines. We hope that this step will initiate wider implementation of this type of solution in the future.

The Result