I am a little confused by Amazon EC2 Spot price and on demand price.
For example, an On-demand windows instance's price is $0.07 per hour.
If I bid on the "spot requests", Do I put down price lower than on-demand price?
Can spot price higher than on-demand price? say $0.08 per hour
If so, why do I need to buy it from spot price?
Is it only for the reason that Amazon can guarantee that I will have my instances ready on the date I specific with the spot price, which on-demand service can not assure my instances will be available at that time(Amazon doesn't have enough servers by that time)??
Thanks!!!
Best Answer
It is my understanding that Spot Instance pricing can be higher than On-Demand pricing in the case where a few users put in a high price to get access to a large number of servers for a short amount of time (usually only 1 hour). See page 18 of the Introduction to Spot Instances document:
You can read more about spot instances and On-Demand vs Reserved vs Spot but basically here are your options:
If you need an always-on server for a long period of time (1 year or 3 years) choose a Reserved Instance for a "bulk discount". By paying up front Amazon can better estimate capacity needs and will guarantee that your server is available for the specified amount of time.
If you need a server that is always-on but for less than 1 year choose a On-Demand instance for your primary or master nodes. These take precedence over Spot instances and are almost always available whenever needed (up to 20, as indicated above). Once your instance is running it will not be terminated by Amazon unless the node has a hardware issue, in which case you will be moved to another node.
If your workload can benefit from extra instances but you do not want to pay the full On-Demand price then you can request Spot Instances for secondary or slave nodes. Spot instances are priced based on excess EC2 supply and spot instance demand, both of which are highly dynamic. There is no guarantee that a spot instance will run (even with a price higher than the On-Demand price), and your server instance can be terminated by Amazon at anytime (to be used by a higher paying Spot instance or an On-Demand instance). This requires your process to be re-entrant and that you save your work frequently.