Spot Instances
Take advantage of unused EC2 capacity in AWS.
They can have up to a 90% discount compared to On-Demand prices.
Concepts
Spot Instance pool:
A set of unused EC2 instances with the same properties, such as the same instance type, operating system, Availability Zone, and network platform.
Spot price:
The current price of a Spot Instance per hour.
Spot Instance request:
A request for a Spot Instance.
The request provides the maximum price per hour that you are willing to pay for a Spot Instance.
They can either be one-time or persistent (persistent means the request would keep replacing instances if it does not meet your specified target).
Cancelling a spot request won't terminate instances.
To cancel a persistent request, first you would have to cancel the request, then terminate the instances.
Spot Instance interruption:
EC2 terminates/stops your Spot Instance when the Spot price exceeds the maximum price for your request or capacity is no longer available.
EC2 provides a Spot Instance interruption notice, which gives the instance a two-minute warning before it is interrupted.
Spot Fleets
A collection, or fleet, of Spot Instances, and optionally On-Demand Instances.
The Spot Fleet attempts to launch the number of Spot Instances and On-Demand Instances to meet the target capacity that you specified in the Spot Fleet request.
Spot Instance pool:
A set of unused EC2 instances with the same properties, such as the same instance type, operating system, Availability Zone, and network platform.
Strategies:
lowestPrice
The Spot Instances come from the pool with the lowest price.
This is the default strategy.
For cost optimization.
diversified
The Spot Instances are distributed across all pools.
For highly available and long workloads.
capacityOptimized
The Spot Instances come from the pool with optimal capacity for the number of instances that are launching.
For best performance.
Spot Blocks
These are spot Instances with a defined duration.
They are designed not to be interrupted and will run continuously for the duration you select.
Makes them ideal for jobs that take a finite time to complete, such as batch processing, encoding and rendering, modelling and analysis, and continuous integration.
Last updated