Design Patterns for Building Resilient Systems - CodeOpinion
resiliencecircuit-breakerfallbackretrydistributed-systems
Abstraction: Fallbacks, retries, and circuit breakers applied per-context for resilient systems
Key points:
- CrowdStrike 2024 incident prompted re-evaluation: author detected indirect impact via fallback metrics firing on third-party API failures
- Three core patterns — fallbacks, retries with backoff, and circuit breakers — should be composed together, never applied in isolation (retry alone adds dangerous latency)
- Fallback values should be "good enough": e.g. showing USD price when exchange-rate API is down rather than breaking the page
- Context is critical: sync client-facing requests require tight timeouts and low-latency fallbacks; async message-queue workers have very different latency tolerances and retry windows
- Circuit breaker pattern: after N failures in a time window, skip the primary service and go directly to fallback until the service recovers
- Bulkhead pattern separates degrading routes from healthy ones to prevent cascading failures across the whole system
Connections: Resilience Patterns · Distributed Systems · Fault Tolerance · Crowdstrike
Source: https://codeopinion.com/design-patterns-for-building-resilient-systems/