Guides

Save on spot instances

Leftover capacity at a discount

Spot instances are spare cloud capacity sold at a big discount, 60 to 91 per cent below the normal on-demand price, with one catch: the provider can take the machine back at any time, when a full-price customer needs it. For work that can handle interruptions, that’s a big saving for almost no downside.

What runs well on spot

Spot suits batch jobs and stateless workers behind a queue, the kind of thing that can stop and start again without harm. If a task gets interrupted, it runs again somewhere else. What doesn’t belong on spot is your main database, or anything that must finish by a fixed deadline. A rule of thumb: if losing the machine mid-task would cost you more than a rerun, keep that work on-demand.

Handling an interruption

The trick is to assume the machine will vanish at any moment, and design so that’s fine:

  • Checkpoint long jobs, so they resume from the last save instead of starting over.

  • Keep workers stateless, so losing one costs nothing but the work in flight.

  • Listen for the provider’s termination notice, the two-minute warning on AWS, and use it to finish cleanly or hand the work back to the queue.

Many teams also keep a small base of on-demand machines for the parts that must stay up, and put only the flexible work on spot.

Getting started

Start with something low-risk, a batch job or a test environment, so an interruption costs you nothing but a rerun. Use your provider’s own tooling to manage it: spot fleets and mixed instance groups spread your request across several machine types and fall back to on-demand if spot runs out. Once you trust it on the small things, move more of the flexible work across. The discount is big enough that it’s worth the bit of engineering to handle the interruptions.

Building a fairer, more transparent cloud industry.

Privacy policy

Terms and conditions

© 2026 Clouding Solutions AB. All rights reserved.

Building a fairer, more transparent cloud industry.

Privacy policy

Terms and conditions

© 2026 Clouding Solutions AB. All rights reserved.

Building a fairer, more transparent cloud industry.

Privacy policy

Terms and conditions

© 2026 Clouding Solutions AB. All rights reserved.