Which Workloads Are Good Candidates for Spot Instances?
Spot instances work best for workloads that can tolerate interruptions. Datadog's infrastructure research shows that organizations using spot instances allocate them primarily to batch processing (38%), CI/CD pipelines (27%), and data analytics (22%). These workloads share a common trait: they can checkpoint progress and resume after an interruption without data loss.
Good candidates: batch data processing, machine learning training, CI/CD build jobs, rendering workloads, stateless web servers behind load balancers, and big data analytics. Poor candidates: databases, stateful applications without checkpointing, single-instance workloads with no failover, and latency-sensitive real-time services.
How Do You Reduce the Risk of Spot Interruptions?
Diversification is the primary strategy. Request capacity across multiple instance types, sizes, and availability zones. AWS Spot Fleet and EC2 Auto Scaling groups support this automatically. If one instance type in one zone gets reclaimed, others continue running. A diversified spot strategy reduces interruption rates to below 5% for most workloads.
Combine spot with on-demand or reserved instances using a mixed strategy. Run your baseline capacity on reserved instances and burst capacity on spot. AWS Auto Scaling groups support mixed instance policies that automatically balance between on-demand and spot. This hybrid approach captures spot savings without risking complete workload failure.
[INTERNAL-LINK: cost visibility for spot tracking → /blogs/cloud-cost-visibility-transparency-guide/]Frequently Asked Questions
Can I use spot instances for production workloads?
Yes, with careful architecture. Stateless applications behind load balancers can run on spot instances if the auto-scaling group maintains minimum capacity across on-demand and spot. When a spot instance is reclaimed, the load balancer routes traffic to remaining instances while a replacement launches. Many organizations run 50-70% of their web tier on spot instances.
How much do spot instances actually save?
Savings depend on instance type and region. Common instance types like m5.large on AWS typically offer 65-75% discounts. Less popular instance types or newer generations may offer 80-90% discounts. Track your actual spot savings in AWS Cost Explorer or equivalent tools to measure real impact against cloud cost optimization targets.
What happens to my data when a spot instance is interrupted?
Instance storage (ephemeral) is lost when a spot instance terminates. EBS volumes persist if configured to survive termination. Always store important data on persistent storage (EBS, S3, or equivalent). Use the interruption notice to flush in-progress work to persistent storage before the instance shuts down.
