2026.10.20 · 7 LESSONS · Distributed systems
Distributed Systems: What Happens When Things Fail?
Reason about partial failure from first principles, build a checkout flow that never duplicates an operation, and undo it safely when a later step fails
MILESTONES0/7 MASTERED
- Partial failure
- Timeouts
- Retries
- Idempotency
- Consistency
- No duplicates
- Compensation
- 01Partial failure: the third outcomeclassify any failed call by what the caller can know: done, not done, or unknown→
- 02Timeouts and deadlineschoose a timeout from percentiles and propagate one deadline through a call chain→
- 03Retries, backoff and jitterdecide what to retry and spread retries out so recovery doesn't cause a second outage→
- 04Idempotency keysmake a charge safe to retry, even when the duplicate arrives concurrently or after a crash→
- 05Consistency without a shared transactionreplace a dual write with an outbox and an idempotent consumer, and name the consistency you get→
- 06Final: a checkout that never charges twicecompose every technique into one flow and prove it with a chaos test against ground truth→
- 07When a later step fails: compensation and sagasrefund a charge exactly once when Shipping rejects the order, and confirm it from webhooks that arrive late, twice or forged→