Cloud Machine Manager Blog

Using Spot Instances to Optimize your Cloud Computing Strategy

Spot InstancesBusiness owners often look for ways to reduce their organizational costs and become more efficient with the budget they have. Migrating to the cloud has become a popular strategy to reduce costs, but even within cloud computing, having the right cloud configuration can help you to save even further on your cloud computing costs.

One of the ways Amazon Web Services (AWS) EC2 users can save on cloud computing bills is through provisioning Spot Instances. Spot Instances are one of 3 purchasing options AWS provides EC2 customers; On-Demand Instances, Reserved Instances and Spot Instances.

So what are Spot Instances? Spot Instances allow EC2 users to bid on unused EC2 capacity through an online marketplace. Users can set an hourly price that you’re are willing to pay for computing capacity, but the price of these EC2 instances fluctuates with supply and demand. But don’t worry, as you never pay more than the maximum price you’ve set – if the Spot Instance price exceeds your maximum limit, your instance will be shut down.

So when is it best to use Spot Instances? Spot Instances are best for applications that you don’t mind being interrupted – remember, if the Spot Price exceeds your maximum bid, the instance will be terminated.

Spot Instances are also great for running simulations completed as batch jobs, in financial services for running analyses such as wealth management and even in geospatial analysis for satellite image processing.

One of the greatest benefits of Spot Instances is that you can save 50-90% on your EC2 costs compared to On-Demand Instances. For example, the On-Demand price for an m4.xlarge instance is $0.239 per hour, but the Spot price for this instance is $0.0358 per hour (for Linux/UNIX Usage, US East [N. Virginia] region, as of 28th January). And because instances are terminated if the price exceeds your maximum bid, you won’t pay any more than you should.

Spot Instances also have a Spot Fleet feature, where if you need quite a bit of computing capacity, you can launch a number of Spot Instances that can be purchased for a low price. The advantage here is that within your Spot Fleet request, you can use a ‘lowest price’ strategy, meaning the Spot Instances that you obtain come from the Spot Pool with the lowest price.

But there’s a particular strategy you can use to minimize the chances that your Spot Instances will be interrupted. Rather than use the ‘lowest price’ strategy, a ‘diversified’ strategy ensures that the Spot Instances your provision come from a range of pools. Therefore, if you provision 200 instances, 20 from 10 different pools, if the price of one pool exceeds your maximum bid, then only 10% of your instances are affected. Pretty cool huh?

But you’re probably asking yourselves, ‘how do I know how much to bid for my Spot Instances?’ Well the clever people at AWS have developed a Spot Bid Advisor that uses Spot Bid history to help you to determine a bid price that is specific for your needs. The Spot Bid Advisor gives you information on how likely you are to being outbid for particular instance types, allowing you to make more informed decisions on what instance types you should bid for.

Ultimately, Spot Instances are a great cost-saving tool for AWS EC2 users who need to cut costs wherever they can. With Spot Instances, you can provision instances for your computing needs without the fear of exceeding any price limits that you set.