HLDintermediate
Circuit Breaker Pattern
Circuit breakers prevent cascading failures by failing fast when a dependency is unhealthy. They are a core resilience pattern in microservice communication.
Reading time
8 min
circuit breakerresiliencemicroservicestimeouts
What Problem It Solves
If a downstream dependency is already failing or timing out, continuing to send more requests just wastes resources and increases latency. A circuit breaker stops calls temporarily.
States
- Closed
- Open
- Half-open
Best Used With
- Timeouts
- Retries with backoff
- Fallbacks
- Bulkheads
Interview Tip
Mention timeout, retry, and circuit breaker together as a resilience bundle.