stealthrocket.tech
Root spandurable_execution

Durable Execution Explained: A Field Guide to the Moving Parts

An independent technical reference on programs that keep their place across process restarts. Durable execution patterns explained from the mechanism up: the log underneath them, the constraints each one imposes, and the costs that do not appear on a vendor comparison page. A guide for engineers deciding whether the trade is worth making.

Figure 1.0the record
Eight steps of one execution floating above a read-order rule, each with a thin leader line dropping to the rule below. The fourth step is highlighted: the one in flight when the process dies, and the only one that runs again on resume. recordedre-run on resume
Eight steps, one record. When the process dies mid-run, everything left of the violet step is read back from the log; only the violet step itself executes twice.
Span
read 04 min8 min12 min
Figure 1.1migration
A schematic of one execution suspending on the first host and resuming on the second: the frame is written to a durable store at the suspension point, the first host is released, and a different host reads the frame back and continues from the recorded offset. t0 · callt1 · suspendt2 · resumet3 · returnhost aframe in memorydurable storelocals + offsethost bframe rebuilthost a released
One execution, two hosts. The suspension point is the only place where state is written down, and the size of what gets written is what decides whether the move was worth making.
Subjectscope

What is durable execution, and what is it not

A program with an ordinary bug fails loudly and you fix the bug. A program that is killed halfway through a four-hundred-item batch fails quietly and leaves you a much worse problem: not an error, but an unknown. Which items were processed? The only component that knew is gone.

Durable execution is the answer to exactly that class of failure and to nothing else. The runtime writes down each completed step outside the process, so that a replacement process can read the record and continue instead of starting over. Everything else in the category — the SDKs, the consoles, the retry policies, the signalling APIs — is machinery around that one durable log.

So the short answer to what is durable execution is: a step-by-step record kept outside the process, plus a rule about who may write to it. Everything a vendor adds on top is convenience around that record.

It is worth stating what is not included, because the marketing tends to blur it. Durable execution does not make side effects happen exactly once at their destination. It does not repair bad logic. It does not remove the need for idempotency keys at your boundaries. And it is not free: every engine in this space buys its guarantee with a restriction on how you are permitted to write the code it supervises. Any guide that presents the guarantee without the restriction has explained half of it.

The three durable execution patterns, explained

The engines differ more than their landing pages suggest, and the difference is which of three mechanisms they use. Knowing which one you are adopting predicts most of the friction. The durable execution patterns below are not marketing categories; each one is a different answer to the question of where progress is written down.

PatternHow progress is keptWhat it constrains
Step recordingEach named side effect writes its result to a log before the next one runsEvery effect must be a separately addressable unit with serialisable arguments
ReplayThe function body is re-executed; completed steps return their recorded values instead of runningThe body must take the same path twice: no clocks, no randomness, no ambient I/O
Journalled suspensionThe paused frame itself is written down and rebuilt on resumeThe locals at each suspension point must be serialisable, and the code version must be pinned

Those three durable execution patterns are not interchangeable in practice. Replay is the most widely deployed and puts the heaviest constraint on your dependency tree, because determinism has to hold transitively through libraries you did not choose. Journalled suspension narrows that requirement considerably and introduces a versioning problem in its place. Step recording is the least magical and the most verbose.

A guide to reading the claims

Four questions separate a real evaluation from a feature-table comparison, and none of them are answered on a pricing page. Treat this as the short version of the guide: if a vendor answers all four plainly, the rest of the documentation is probably honest too.

  1. Which of the three mechanisms is this, and therefore what am I being asked to stop doing in the supervised code?
  2. How large does the history get, how long is it kept, and who pays for reading it back on every resume?
  3. What happens to work suspended against the previous deploy: is there a pinning story, or does a release break in-flight executions?
  4. When the guarantee is described as exactly-once, exactly once as observed by what: the log, or the payment provider?

The honest summary of what is durable execution good for: processes with multiple steps, real outside effects, and a runtime measured in minutes or longer, where restarting from the beginning is either expensive or unsafe. For a three-second idempotent handler it is bookkeeping you pay for and never read. That boundary, once explained clearly, decides most adoption arguments before anyone compares feature tables.

What this site covers

Four subject areas, all of them mechanism-level, not tutorial: workflow orchestration engines and what they really guarantee, coroutines as a unit of distributed work, the CPython and WebAssembly runtime details that make either possible, and the queue failure modes that sit underneath all of it.

There is no advertising here, nothing is sponsored, and no vendor has reviewed any of it. Where a specific product is named it is because naming it makes the mechanism clearer.

Clarifications6 entries

Common questions

What is durable execution, in one sentence?

Durable execution is running a program so that its progress is recorded outside the process, step by step, so a crash resumes it at the last recorded step instead of restarting it from the beginning.

Is durable execution the same thing as a retry?

No. A retry runs the whole unit of work again and needs the whole unit to be safe to repeat. Durable execution records each step as it completes, so a resume repeats only the step that was in flight. The distinction matters most when the earlier steps had side effects you cannot repeat.

Does durable execution give exactly-once side effects?

It does not, and no engine on the market does. What it guarantees is that the workflow observes each recorded step exactly once. If a step charged a card and the process died before the result was written, the step runs again; the idempotency key at the boundary is still the application’s responsibility.

What are the common durable execution patterns?

Three recur. Step recording, where each side effect is a named unit whose result is logged. Replay, where the function body is re-executed and completed steps return their recorded values. And journalled suspension, where the runtime stores the paused frame itself. Each puts a different constraint on how the code may be written.

What has to change in existing code to adopt it?

Every outside effect has to become something the runtime can name and record separately from the code that decides when to call it. Pure computation usually stays as it is. The size of the change is roughly proportional to how much I/O the process does, not to how long the process is.

Which failures does it not help with?

Logic errors, bad data and a dependency that is simply wrong. Durability makes a process survive infrastructure failure; it faithfully re-runs a mistake as often as you ask it to.