Cost Optimization with Google Spot VMs and AWS Spot

  • January 5, 2022

At Flugel.it, we talk a lot about how the cloud can be used to optimize costs. It can offer unlimited scalability and lower your IT costs. That being said, many companies are wasting money in the cloud. Up to 70% of cloud costs are potentially wasted because of poor adoption or underutilized features. It’s critical for your business to understand the impact of the cloud on the bottom line. Creating a cost report can help you understand your businesses’ spending in all areas, especially when it comes to your cloud infrastructure. Once you have a clear understanding, you can start to optimize your costs.

During the optimization process, you will most certainly come across many potential cost-saving solutions for the cloud. On-demand pricing is a very effective model many companies use. However, there are two even more cost-effective cloud solutions—Google Preemptible and AWS Spot—to consider.

 

What is Google Spot VMs?

Spot VMs are Google’s answer to lower cloud costs. Spot VMs have excess computing capacity and can help your company optimize your cloud spend. By offering spot VMs, they are offering computing capacity at lower prices than on-demand instances. In fact, you could reduce costs by up to 60%-91% discount.

GCP can offer a spot instance at a much lower price than other instances. However, Compute Engine might preempt Spot Vms if it needs to reclaim those resources for other tasks. Spot VMs are excess Compute Engine capacity, so their availability varies with usage. Spot VMs do not have a minimum or maximum runtime.

Spot is ideal for batch jobs and fault-tolerant workloads. It completes your batch process without requiring you to pay the full price you would for additional “normal” instances. It also does not place added workload on existing instances.

 

What is AWS Spot?

AWS Spot instances are, like preemptible, available for less than on-demand prices. They can be up to 90% cheaper. In this case, you will pay an hourly rate for a Spot instance. The price for each instance type is set based on the availability zone and based on supply and demand for Spot instances. These are ideal when your application has some flexibility regarding availability and when applications can be interrupted. AWS Spot gives a 2-minute warning before the interruption.

Also, like preemptible, Spot instances work well for stateless, error-tolerant, or flexible applications such as batch jobs, data analysis, and background processing, along with optional tasks. Spot instances are integrated with other AWS services such as AWS Batch, Auto Scaling, ECS, ECS, Data Pipeline, and CloudFormation. In AWS Spot instances, the recommended combination is to use EKS with Spot fleet to manage all the nodes. For the best optimization in terms of cost and performance, you can combine Spot instances with On-Demand, RI, and Savings Plans.

 

Benefits of GCP Spot and AWS Spot

The biggest advantage of GCP Spot and AWS Spot is the cost savings. There are additional benefits as well.

 

Innovation and Growth

Spot instances allow for experimentation without high costs. This will help your business be more flexible and grow. These types of instances are great for development or testing environments, but they can be used in production if the applications are fault-tolerant and especially if the application is stateless, meaning it does not store any information in local disks.

Developers can use many preemptible or Spot instances in order to seamlessly integrate innovation at a faster pace. They can also use them to prevent bottlenecks in the development lifecycle. There is also a competitive advantage. By operating and developing faster at lower costs, your business will gain an edge over the competition.

 

Governors

Spot instances also work well with Kubernetes clusters. There is the ability to notify the Kubernetes scheduler when an instance dies. The scheduler can move the workload to other instances. It’s crucial to configure at least two node groups or instance groups, one with Spot/preemptible and one without Spot/preemptible. If the groups with preemptible are not available, Kubernetes can schedule the instances to the other group to keep the application up and running.

As you optimize spending in the cloud, implementing preemptible or Spot instances can have significant advantages, especially in cost reduction. When combined with on-demand and reserve instances, you can keep your applications running. By using different levels of computing, you can achieve cost optimization and efficiency in the cloud.

 

Credits
Written by: Gabriel Vasquez
General corrections and edition: Diego Woitasen