What are Spot Instances?
Explaining Spot Instances: Saving 80-90% on Cloud Compute Costs
Spot Instances are spare compute capacity in the cloud and offered as one of the three ways that Cloud Providers sell its compute capacity – the other two being
On-Demand Instances and
Reserved Instances. In terms of the servers themselves, there is no difference between the three.
The difference is in the business model. Whereas On-Demand Instances are pay-as-you-go and Reserved allow you to rent a server on a 1-year or 3-year basis, Spot Instances allow you to save up to 90% on your compute costs by using the Cloud’s otherwise unused servers. Cloud providers want to monetize these otherwise unused servers, by selling them at an extreme discount.
What you should know about EC2 Spot Instances:
1. Spot Instances are cheap!
With server costs going at anywhere from 80-90% off On-Demand prices, and 30-60% off Reserved Instances, Spot Instances offer the largest savings across the board.
2. Spot Instances can get terminated within 2 minutes
The caveat of Spot Instances is that AWS can terminate these instances with little to no warning (max of 2 minutes). If your workloads require any availability, consistency, or data integrity, managing these workloads on Spot requires extra configuration and management.
And without any SLA, if something happens, it is your responsibility to deal with it.
Example; Understanding EC2 Spot Instances Anatomy
EC2 Spot Instances are AWS’ excess compute capacity (Idle On-Demand Severs); across AWS’ regions, availability zones, instance types, and sizes.
Spot Instances are pretty volatile in specific markets. That is to say, Spot Instances are pretty volatile if you’re looking for a specific instance type in a specific availability zone. This is simply because certain instance types in specific AZ’s are sometimes fully utilized by On-Demand or Reserved Instances.
For most companies, this means Spot Instance usage is limited to some dev environments and data processing workloads.
However, by leveraging multiple instance types or availability zones, Spot Instances are far less volatile as there is a far greater chance that you’ll find an unused server for one of the fitting instance types in one of the fitting AZ’s. By widening your range of instance types and setting a fallback to On-Demand Instances whenever no Spot Instances are available, you can ensure that you always have a fitting server without sacrificing performance needs. If you can predict the terminations further in advance, this gives you time to trigger a smart migration (all behind a load balancer), guaranteeing that your applications will always stay live despite running primarily on Spot Instances.
Some extraordinary DevOps teams have worked hard to write scripts that manage this system of running mission-critical workloads on Spot Instances by themselves. Others, not wanting to spend the time or take the risk, have leveraged a Spot Management platform like Spotinst to do it for them. Read more about Spot Instances DIY challenges.
Spotinst predicts Spot Instances behavior, capacity trends, pricing, and interruptions rate. Whenever there’s a risk of interruption, Spotinst acts accordingly to balance capacity up to 15 minutes ahead of time, ensuring application availability backed up by Spotinst’s enterprise-level SLA.
By predicting interruptions and fluctuations Spotinst is able to offensively rebalance clusters to prevent interruption.
In the event where Spot Instances aren’t available, Spotinst will automatically fallback to On-Demand Instances and will revert back to Spot Instances whenever possible, all while persisting your storage, network configuration, and state.