Spot instance pricing is a fascinating EC2 pricing model that many people have not heard of yet. It is not only interesting from the 50%-90% savings perspective, which is already huge. It is also interesting because it encourages you to think about building your system with the best practice of high availability in mind.

Here’s a comparison chart with a completely realistic spot savings of 80%. Here’s also a more in-depth comparison of the difference in pricing: On-Demand vs Reserved vs Spot AWS EC2 Pricing Comparison

Spot Pricing Basics

The way spot works is that you bid for your instance, like an eBay auction. If the spot market price is below your bid price then get the instance at the market price. I’ll repeat that. You pay the lower market price, not the price you bid on. An example to illustrate:

On-Demand price $1/hr
The market spot price $0.2/hr
Your bid price $0.5/hr
What you pay $0.2/hr

This is a fascinating model by AWS and is favorable to saving you even more money. I think it’s a genius move by AWS. Imagine if eBay ran this way. You win an item on eBay, and you pay the second-highest bid that lost. You don’t even have to set a bid. AWS will default the price to the on-demand price in that case. Awesome for you right?

Spot Considerations

With spot instances, AWS can terminate or stop your instance at any time. Because of this and the generous pricing model, people sometimes just bid at the on-demand price to increase their chances of getting the spot instances. According to AWS, spot instances get interrupted less than 5% of the time across all regions. Here’s a screenshot of the number from the AWS Spot Instance Advisor site.

There are many ways to build highly available infrastructure using spot instances. You can use an AutoScaling mixed instances types configuration that uses both on-demand and spot instances. You can also have an on-demand ASG fleet alongside the ASG spot fleet that scales as needed.

By learning how to use spot instances, you can save 50% to 90% of your AWS bill, which makes a big difference to the bottom line. Learn more about Spot Compute here: BoltOps Learn videos on Spot

Summary

In this post, I introduced and the basics of Spot Instance Pricing. The jaw-dropping 50%-90% savings is real, and I’ve seen it repeatedly. Even more interesting, by thinking in terms of how spot instances work, it enforces a best practices constraint on how you think about how the infrastructure world. It encourages you to think about how you should design and architecture your systems so that they are cows, not pets, which ultimately is what you want anyway. Hope it’s been helpful.