AWS spot instances are another method of cloud computing provisioning in AWS, besides on-demand instances and reserved instances. The common notion of spot instances is that they are cheap and they are tricky... sometimes too tricky for the cost to be of any importance.
In fact, spot instances are a great solution for getting some highly intense computing power at about 15% of the cost. What you need is some planning and safeguarding, and you can effectively optimize your infrastructure costs without losing performance.
What is special about spot instances? Spot instances are running in the temporarily available cloud computing capacity, and this concept defines their key features:
- - Spot instances are offered at a discount of up to 90% of the on-demand price
- - The prices of spot instances are defined by the current supply and demand. The applicable prices for spot instances are published on the AWS website
- - When you request a spot instance, you specify the maximum hourly price you wish to pay for it. You will have your instance as long as your price is higher than the published spot price, while you will actually pay only the published price
- - Once your price drops below the published price, your instance will be terminated with a 2-minute warning
- - You can follow the price and savings trends and estimate the chance of being outbid on the Bid Advisor.
- - You can guarantee that your instance will remain running for a defined period of 1 to 6 hours. In this case, the savings will be 30-50% of the on-demand price
- - If your instance is terminated due to the spot price increase, you will only pay for the complete hours your instance has been running
Since May, 2017, you can request spot instances via EPAM Orchestrator through its native functionality. Use the or2run command adding the --spot flag and specifying the maximum price you are prepared to pay for the spot instance:
More details on Spot Instances can be found in the official AWS documentation.