Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use an on-demand instance when I can use a spot instance

Let's say the on-demand instance cost is $1/hour. I assume the spot instance is always cheaper than the on-demand instance. Amazon says that a spot instance can only be shutdown when your bid price is inferior to the spot price.

Instead of buying an on-demand instance, why wouldn't you bid $1 for the spot instance and end up paying less? Since the spot price is supposed to be lower than $1, you would still be guaranteed to have an instance.

Are they any differences between on-demand and spot that justify the use of the former?

like image 946
Youcha Avatar asked Jan 11 '23 08:01

Youcha


1 Answers

Spot instances are not always cheaper than on demand, they can and do sometimes fluctuate wildly, even to very high per hour amounts, higher than the on demand price at times...but in general, if you bid as you say ($1/hour) and your application can handle being turned off without any notice or consequences, you can save money with spot over on-demand.

There is no amount of money you can bid per hour to guarantee that you instances won't be terminated; if your app can't handle unexpected terminations, best to go with on-demand, or better yet reserved instances (which are much cheaper than on-demand, but require a term commitment of 12-36 months).

like image 105
E.J. Brennan Avatar answered Jan 19 '23 17:01

E.J. Brennan