# Durability starts with a recovery record

Principle `durability`. A reading order for storage, replay, worker ownership, overload, and recovery tests.

Also searched as: durability patterns.

**Effect is not BEAM.** Fibers do not provide private process heaps or OTP restart strategies. A durable operation needs storage and a recovery owner.

Use [the durability skill](/skills/durability) to review a design. These pages separate the book principles from our Effect 4.0.5 mappings.

The template declares Effect 4.0.0. These API and absence claims were checked in 4.0.5 only; verify the matching template source before applying them.

## Reading order

- [Effect is not BEAM](/principles/effect-is-not-beam): Fibers share a runtime; scope ownership does not supply isolated heaps or OTP restart strategies.
- [Durable work needs storage](/principles/durable-work-needs-storage): A restarted worker cannot recover intent that existed only in memory.
- [Every task needs an owner](/principles/every-task-needs-an-owner): Give child work a lifetime, a failure observer, and a recovery decision.
- [Supervision chooses what restarts](/principles/supervision-is-a-recovery-policy): Restart policy follows dependency shape and bounds repeated recovery.
- [Restart must reconstruct known state](/principles/restart-from-known-state): Execution recovery and state recovery need separate contracts.
- [Retry needs idempotent effects](/principles/retry-needs-idempotency): Repeating an operation must preserve its intended observable result.
- [Checkpoints follow the promised commit](/principles/checkpoints-follow-commits): Persist state and progress together when one store can transact both.
- [Replay needs stable inputs](/principles/replay-needs-stable-inputs): Historical processing must not silently depend on today’s clock or external decisions.
- [Old events must still decode](/principles/old-events-must-still-decode): Retained data needs compatibility rules before recovery depends on it.
- [Dead letters need a return path](/principles/dead-letters-need-a-return-path): Exhausted work needs durable evidence, an owner, and deliberate redrive.
- [Timeouts bound waiting](/principles/timeouts-bound-waiting): A local timeout stops waiting; it does not prove the remote action never happened.
- [Retry load needs a budget](/principles/retry-load-needs-a-budget): One retry owner must control attempts, delay, and aggregate load.
- [Circuit breakers have state](/principles/circuit-breakers-have-state): A breaker stops doomed calls and controls probes before restoring traffic.
- [Bulkheads isolate scarce capacity](/principles/bulkheads-isolate-capacity): Reserve independent capacity for workloads that must not starve each other.
- [Backpressure reaches the producer](/principles/backpressure-reaches-the-producer): Bounded consumption helps only when upstream respects waiting or refusal.
- [Admission control protects recovery](/principles/admission-controls-new-work): Refuse or defer work that cannot be served usefully under current load.
- [Steady state recycles resources](/principles/steady-state-recycles-resources): Every accumulation needs a deliberate recycling policy.
- [Queries need result bounds](/principles/queries-need-result-bounds): Limit result cardinality before the driver materializes an oversized response.
- [Failures keep their meaning](/principles/failures-keep-their-meaning): Expected refusals, infrastructure faults, and defects need different policies.
- [Cleanup can be an idempotent postcondition](/principles/cleanup-can-be-an-idempotent-postcondition): Already-absent state can be success when absence is the operation’s intended result.
- [Pure cores reduce timeline coupling](/principles/pure-cores-reduce-timelines): Move deterministic rules out of time-dependent actions and shared mutable state.
- [Recovery needs model tests](/principles/recovery-needs-model-tests): Test sequences of failures and recoveries against explicit invariants.
- [Golden signals expose overload](/principles/golden-signals-expose-overload): Measure latency, traffic, errors, and saturation, including failed work.
- [Shared schemas need a transition period](/principles/schema-changes-need-a-transition): Keep old and new representations usable while consumers migrate.
- [Durable timers need recovery](/principles/durable-timers-need-recovery): Persist scheduled intent when losing a worker must not lose its deadlines.
- [Request lifetime is not durability](/principles/request-lifetime-is-not-durability): Worker waitUntil has a shared post-response allowance; required work needs a durable marker and redrive.

## Existing rat-stack paths

- [Scopes release resources when work ends](https://ratstack.sh/lore/scopes-own-resources).
- [Concurrent work needs an owner](https://ratstack.sh/lore/concurrent-work-needs-an-owner).
- [Lifecycles are machines](https://ratstack.sh/lore/lifecycles-are-machines).
- [The error model](https://ratstack.sh/lore/error-model).
- [Schemas define the boundary](https://ratstack.sh/lore/schemas-define-the-boundary).
- [Accumulate independent errors](https://ratstack.sh/lore/accumulate-independent-errors).
- [Cache completed values](https://ratstack.sh/lore/cache-completed-values).
- [Layers make dependencies explicit](https://ratstack.sh/lore/layers-make-dependencies-explicit).
- [Property-based testing](https://ratstack.sh/lore/property-based-testing).
- [Uncomplect](/skills/uncomplect).
- [Add a lifecycle machine](https://ratstack.sh/skills/add-a-lifecycle-machine).
- [Investigate a failure](https://ratstack.sh/skills/investigate-a-failure).

## Sources

Read [the durability bibliography](/bibliography) for books, sections, and checked short quotations. API names describe the 4.0.5 source, not a requested upgrade.

## Skills
- [Durability starts with a recovery record](/principles/durability)

## Sources
- Gray II, James Edward; Tate, Bruce A. *Designing Elixir Systems with OTP*. Pragmatic Bookshelf, 2019. [Link](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/). ([b3-designing-elixir-systems-with-otp](/bibliography#b3-designing-elixir-systems-with-otp))
- Nygard, Michael T. *Release It!: Design and Deploy Production-Ready Software*. Pragmatic Bookshelf, 2007. [Link](https://archive.org/details/releaseitdesignd0000nyga). ([b4-release-it](/bibliography#b4-release-it))

## References
- [Effect contributors. Effect 4.0.5. workflow/WorkflowEngine.ts](https://github.com/Effect-TS/effect/blob/7f524e25cfb49a71ac39b0f44278d08d40dda5de/packages/effect/src/workflow/WorkflowEngine.ts). Pinned source for our Effect mapping, not a claim from the book.
