BeCuriouzBeCuriouz

Learn something new every day

☁️ Cloud & Infrastructure
🏷️

The cloud's 90%-off aisle comes with a catch

💡 Spot instances are the cloud's discounted spare capacity — same hardware, up to ~90% cheaper, but reclaimable at a moment's notice, so they suit only interruptible, stateless workloads.

Every cloud provider runs data centers sized for peak demand, which means huge amounts of server capacity sit idle most of the time. Rather than let it go to waste, providers sell that spare capacity as spot instances (AWS calls them Spot; Google uses Spot VMs; Azure has Spot Virtual Machines) at discounts that can reach up to ~90% off the normal on-demand price.

The catch is baked into the deal: the provider can reclaim a spot instance the moment a paying on-demand customer needs that hardware. On AWS you get just a two-minute warning before your machine is shut down. Crucially, the underlying hardware is identical to on-demand — the discount isn't for slower or older servers, it's the price of interruptibility.

That makes spot a great fit for fault-tolerant, stateless work that can pause and resume: batch data crunching, video encoding, CI/CD test runs, machine-learning training with checkpoints, and worker nodes in an auto-scaling pool. It's a poor fit for anything that can't survive a sudden shutdown, like a primary database or a single stateful server holding a user's session.

The engineering trick is designing around interruption — spreading work across many instances, saving progress frequently, and treating any given machine as disposable. Do that, and you get near-full performance for a fraction of the cost.