- System patterns
- Resilience
Resilience
Patterns that keep a service standing when its dependencies fail, slow down or get more traffic than they can take.
6 guides110 min in totalSystem patterns
The guides, in order
Read them top to bottom: each one builds on the ones before. The ones you've read carry a check.
- Circuit breaker: fail fast when a dependency is downHow a circuit breaker stops a slow dependency from dragging your whole service down, with thresholds, half-open probes and fallbacks.11 min readStart here
- Retry with Backoff: Exponential Delays, Jitter and Retry BudgetsHow to retry failed calls without turning a short outage into a retry storm, using one retry layer, exponential backoff, full jitter and a retry budget.20 min read
- Timeouts and Deadline PropagationWhy every remote call needs a deadline, and how to pass a single request budget through a chain of services so no one waits for work the caller has abandoned.19 min read
- Bulkhead: Isolate Resources So One Failure Stays ContainedHow the bulkhead pattern caps concurrency per dependency or tenant so one slow downstream cannot exhaust a service's shared workers.19 min read
- Rate Limiting: Token Bucket, Sliding Window and Honest 429sHow to rate limit a public API with token buckets and sliding windows, where to enforce each limit, and how to answer with a useful 429.22 min read
- Idempotency Keys: Making Retried Writes SafeHow idempotency keys, stored responses and in-flight locks let clients retry payment-style writes without charging or paying anyone twice.19 min read
About this group
- What you'll find
- Circuit breaker, retries with backoff and jitter, timeouts with deadline propagation, bulkheads, rate limiting and idempotency keys.
- It's for you if…
- in a design interview you get asked "what if that service goes down or slows down?" and don't know what to say.
- How each guide works
- Each guide explains the problem, the solution and an analogy, with a diagram, pseudocode and code in TypeScript, Python and PHP. It also covers when to apply it, its trade-offs, how it fails and how to mitigate that, and when and how to bring it up in an interview.