Circuit Breaker & Resilience Patterns
Implement fault tolerance with circuit breakers, retries, bulkheads, and fallback strategies.
- Difficulty
- advanced
- Read time
- 1 min read
- Version
- v1.0.0
- Confidence
- established
- Last updated
Quick Reference
Circuit Breaker: Use states (closed/open/half-open). Open after N consecutive failures, try again after timeout. Combine with retry (exponential backoff + jitter), timeouts, bulkheads. Use Cockatiel (TS) or Tenacity (Python). Always have fallback strategies for degraded operation.
Use When
- Calling external services
- Microservices architecture
- Network-dependent operations
- Third-party API integration
Skip When
- Local operations
- In-memory processing
- Trusted internal services
Circuit Breaker & Resilience Patterns
Implement fault tolerance with circuit breakers, retries, bulkheads, and fallback strategies.