CLOUD / A CONCEPT NOTE

Spot Instances

cheap machines that vanish

~70 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

Spot (or preemptible) instances let you bid on unused cloud compute capacity at a discount (up to 90%). The catch: the provider can reclaim the machine with a 2-minute warning.

02 / FOLLOW THE MECHANISM

How spot preemptions flow

  1. Request

    user requests 10 Spot instances for batch job tasks.

  2. Allocation

    cloud provider assigns idle VM nodes at discounted pricing.

  3. Reclaim warning

    cloud needs capacity back, sending a 2-minute metadata warning to VM.

  4. Eviction

    resilient workload drains current transactions and exits before VM terminates.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

poll AWS metadata endpoint for termination alerts

curl -H 'Metadata: true' http://169.254.169.254/latest/meta-data/spot/termination-time

Explore command anatomy in the CLI lab