Spot instances
Spot instances are not guaranteed to be available. The chances of getting spot instances can be improved by providing instance_distribution
, a list of alternative instance types to the primary instance_type
you specified. If left blank, Cortex will only include the primary instance type in the instance_distribution
. When using instance_distribution
, use the instance type with the fewest compute resources as your primary instance_type
. Note that the default value for max_price
is the on-demand price of the primary instance type, but you may wish to set this to the on-demand price of the most expensive instance type in your instance_distribution
.
Even if multiple instances are specified in your instance_distribution
on-demand instances are mixed, there is still a possibility of running into scale up issues when attempting to spin up spot instances. Spot instance requests may not be fulfilled for several reasons. Spot instance pricing fluctuates, therefore the max_price
may be lower than the current spot pricing rate. Another possibility could be that the availability zones of the cluster ran out of spot instances. on_demand_backup
can be used mitigate the impact of unfulfilled spot requests by enabling the cluster to spin up on-demand instances if spot instance requests are not fulfilled within 5 minutes.
Example spot configuration
Only spot instances with backup
3 on-demand base capacity with 0% on-demand above base capacity
0 on-demand base capacity with 50% on-demand above base capacity
Last updated