With Spot Instances, you can rent extra EC2 computer capacity at a fraction of the cost of On-Demand. They can be interrupted at any time, but when used in an automatic scaling group, they make a good replacement for On-Demand.
Location settings pricing is most static these days
Previously, Spot Instances functioned much like the stock market. AWS customers would bid on a price they wanted their instance to run at, and the instance would run as long as that price was available. This caused prices to fluctuate like crazy all day, sometimes even priced higher than on demand when demand was high.
AWS changed this and now Spot Instances has a mostly fixed price. With the new model, you can simply set a maximum price that you are willing to pay, and you will be charged regardless of the current Spot price for that hour.
The price may still change a bit, but AWS is huge, and has a lot of computer capacity. Unless some companies rent out their entire capacity, the price does not vary at all. For almost every instance type, the fluctuations are only visible for a whole month, and even then it almost never comes close to the price on request.
You can see prices for Spot Instance yourself from the EC2 console by clicking on “Spot Requests”; in the sidebar and opening the “Pricing History” dialog box.
You can scroll around and you will see that most cases are almost completely static from day to day. Fluctuations will only be visible for weeks and months. The
c5.large the instance is quite popular and sees some fluctuations, but it remains mostly the same:
Other cases, such as
r5.4xlarge, may vary slightly, but does not usually come close to the price on request.
Other cases, especially the T2 / T3 range, do not fluctuate at all, perhaps by a few cents each week. AWS has more than enough capacity to meet the needs of every Spot Instance user at a great price, and that’s the price they want to sell electricity costs at.
You can use Spot instances just as you would use regular EC2 instances. You usually start a fleet of them with an automatic scaling group, where if an instance is recovered by AWS, a new one can be quickly spun up.
In general, the price for Spot Instances is usually at least 50% of the On-Demand price, with most types of instances hovering around 60-70% or so. AWS’s claim of “up to 90% cost savings” really emphasizes “up to.” The only instances you will find with 90% cost savings are examples of previous generations
c1.medium, as an easy way for AWS to sell its older hardware.
This consistent cost savings places the site in a good location. They offer about the same price savings as reserved entities (and are sometimes a little cheaper), while they do not have the 1- or 3-year contract linked to it. If your server’s life cycle can be easily automated to use automatic scaling, you probably do not mind if you need to restart a server from a fleet of 10.
This does not mean that Spot Instances will end randomly all the time – interruptions are actually quite rare. During a given month, the average completion rate is 5%, which means you will probably not see any frequent interruptions unless you run many instances. (In which case, you can probably handle them.) You still need to plan for interruptions, as there is a non-zero chance and the chance is higher for some types of instances. You can see the interruption rate for your instance on AWS’s Spot Instance Advisor calculator.
You still get two minutes notice, which is enough time for your car scale group to start a new one with minimal interruptions. We still recommend having at least two cases in an autoscaling group to completely prevent service interruptions.