SRE & Observability (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is the Circuit Breaker Pattern and how does it prevent Cascading Failures?
senior Levelsre-observabilityAdvanced Internals
In Simple Words: When a downstream service (e.g. Payment Gateway) hangs or slows down:
- Upstream services wait on thread timeouts, exhausting their own thread pools until every microservice across the entire company crashes sequentially.
- Circuit Breaker: Tracks failure rates. When failures exceed 50%, the circuit flips to Open:
- Immediately rejects calls locally without network calls.
- Returns a fallback response instantly, protecting upstream caller threads.