Skip to content
About
Main content

Cost-aware placement and spot

When is spot capacity viable, and how should hardware be compared on price?

Spot machines convert from an internal policy choice into an exogenous arrival process. You no longer decide when the victim dies. The market does. You only decide how much work is in flight when it happens.

The viability test

Let τ be the interval (how often you save progress) and M be the mean time between interruptions. When an interruption comes, on average half an interval of work is lost: ~τ/2. So

, about 4.2% for a 30-minute checkpoint against 6 hours between interruptions, plus the cost of the checkpointing itself; far smaller than the discount (spot economics).

If tasks are shorter than M and idempotent (safe to run again), then τ is effectively the task length: you lose at most one task, and no checkpoint machinery is needed.

So spot is viable exactly where work is finely granular and re-executable. It is unusable for the coordinator, for a long , or for anything holding unreplicated state. The 60–90% discount is not a discount on compute. It is the price of accepting an interruption distribution, and the fine granularity is what makes the expected loss small.

Two corrections

  1. One instance type in one is reclaimed as a group. "We are diversified across 300 nodes" can be one failure domain wearing a costume. Diversifying across instance types and zones is the placement analogue of erasure coding across failure domains (storing coded pieces so that any k of n survive).

  2. Tiered hardware is routinely compared at $/hour, when the only meaningful unit is $/unit-of-work.

    Worked example. Machine B costs 2.5× the price per hour of old machine A and finishes the same job 3× faster. Cost per job: A = 1 price-unit × 1 hour = 1.0. B = = 0.83. B is cheaper and returns capacity sooner. The $/hour comparison systematically over-selects old hardware.

Spot prices an interruption distribution, and the bill is small only when your work is granular enough to lose cheaply.