Resilience

Nygard's stability patterns and the antipatterns they defend against, worked one at a time in Go. Every pattern here trades capacity, latency or correctness for survival, so each post says what it gives up as plainly as what it buys back. The primitives first, timeout and retry and fail fast, then the patterns that compose them, then the failure modes the whole set exists to prevent. Each post takes one entry: the mechanism, where the cost goes, the shape of problem it fits, when it is the wrong answer and what to do instead, and the Go to write it, with at least one diagram showing the thing going wrong rather than the thing working, because a pattern only makes sense against the failure it prevents. Sister to Distributed Systems and Concurrency. Part of Under the Hood.