Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!!!

share|improve this question

2 Answers 2

up vote 8 down vote accepted

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:

Access Large Pools of Compute Capacity: Spot Instances can be used to help you meet occasional needs for large amounts of compute capacity (note that the default limit for Spot Instances is 100 versus the default limit of 20 for On-Demand Instances.) If your needs are urgent, you can specify a high maximum price (possibly even higher than the On-Demand price), which will raise your request’s relative priority and allow you to gain access to as much immediate capacity as possible given other requests and the Spot Instance capacity available at the time. While Spot Instances are generally not suitable for steadystate tasks such as serving web content, they can be used as a valuable source of instance capacity even for steady state applications when applications have urgent computing needs due to unanticipated or short-term demand spikes.

You can read more about spot instances and On-Demand vs Reserved vs Spot but basically here are your options:

  1. 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.

  2. 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.

  3. 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.

share|improve this answer
    
Greg, Thanks so much for your answer. I am computer science student doing a research project in Cloud computing. Your answer helped a lot! I am also quite curious how Amazon calculates its spot price, because I notice that in Amazon Spot instance request, you can specify start time and end time. Does Amazon use the bids and this two date time to predict future usage or they just compute spot price by viewing their current available resources? P.S. It looks like a black box, nobody knows what is in side –  Leon Aug 1 '10 at 20:37

Greg explained the details vey well, but I just wanted to add some notes based on my experience with spot priced instances.

If you use the Amazon AWS Console to launch your spot priced instance, there's a link where you can check the current spot price and see how it has been fluctuating over time. In most cases, if you bid somewhere between the current spot price and the on-demand price, you'll get your instance within half an hour or so (note that in my experience it defintely takes a bit longer to get a spot priced instance compared to an on-demand instance). This method should be fine for short-lived instances, as long as you don't need them right away (for example, if you want to fire up additional instances to cope with fluctuations in load on a web site, you will need to take the increased startup time into account.

Be careful about bidding above the on-demand price, especially if you want to start multiple instances. You might think this will guarantee you a running instance, but I've seen this practice actually drive up the current spot price.

share|improve this answer
    
Gareth, Thanks so much for your answer. I am computer science student doing a research project in Cloud computing. Your answer helped a lot! I am also quite curious how Amazon calculates its spot price, because I notice that in Amazon Spot instance request, you can specify start time and end time. Does Amazon use the bids and this two date time to predict future usage or they just compute spot price by viewing their current available resources? P.S. It looks like a black box, nobody knows what is in side –  Leon Aug 1 '10 at 20:37
    
You're welcome, Leon ! The spot price calculation is indeed a black box; I suspect that Amazon wouldn't release the details since it's competitive information. –  gareth_bowles Aug 2 '10 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.