Spot instance pricing is a fascinating EC2 pricing model that many people have not heard of yet. It is not only interesting from the 60%-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:
|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. Awesome for you right?
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. Also, there are many other ways to build highly available infrastructure using spot instances. If you’re interested check out: Spot Instance Highly Available Architecture.
In this post, I introduced and the basics of Spot Instance Pricing. The jaw-dropping 60%-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.