Overview Both are ways to rent compute capacity from a cloud provider, but they trade cost against reliability in opposite directions. Spot Instances tap into unused capacity at steep discounts but can be reclaimed with almost no notice, while On-Demand Instances cost more per hour in exchange for a guaranteed, uninterrupted slot.
Comparison Diagram Timeline of a running workloadOn-Demand InstanceReserved for you, no interruptionsRuns continuously until you stop itSpot InstanceRunning!2-min warningthen reclaimedResumes on new capacityUp to 90% cheaper, but availability is never guaranteed Comparison Table Aspect Spot Instances On-Demand Instances Request & provisioning Fulfilled only if provider has spare capacity at your bid price Fulfilled immediately from reserved capacity pools Capacity guarantee None — provider can reclaim the instance at any time Guaranteed for as long as you keep paying Pricing model Variable, set by real-time supply and demand for spare capacity Fixed hourly rate published by the provider Interruption behavior Reclaimed with a short warning (e.g. ~2 minutes on AWS) Never interrupted by the provider; you control shutdown Cost predictability Fluctuates; can spike or be revoked when demand rises Stable and predictable, easy to forecast in a budget Ideal workloads Fault-tolerant, stateless, or checkpointable batch jobs Stateful, latency-sensitive, or continuously running services Termination control Provider-initiated; your app must handle abrupt shutdown User-initiated; you decide exactly when it stops Key Differences Spot pricing floats with market demand and can be up to 90% cheaper than On-Demand rates Spot capacity is reclaimable at any time, typically with only a short warning window On-Demand gives a firm capacity guarantee that Spot never promises Workloads on Spot need to tolerate sudden termination or design for checkpointing On-Demand cost is fixed and predictable, while Spot cost is variable and market-driven When to Use Each Spot Instances
...