Summary
Circuit breakers prevent cascading failure by stopping the propagation of downstream errors to upstream callers, converting unbounded connection wait into fast failure with a predictable error response and giving the downstream dependency time to recover without continued load.
Evidence
- ·Netflix Hystrix (2013) was built explicitly to prevent cascading failures in microservice architectures after production incidents
- ·Circuit breaker open state returns immediate errors instead of blocking threads: prevents thread and connection pool exhaustion
- ·Half-open probe allows recovery validation without a thundering herd of retries on recovery
- ·Resilience4j, Spring Cloud Circuit Breaker, and Envoy proxy implement circuit breaking as a first-class feature
- ·Amazon's internal service mesh uses circuit breakers as standard for all synchronous inter-service calls
Operational Context
- ·Tune failure rate threshold per dependency SLA: a database circuit (low tolerance) needs different thresholds than a non-critical notification service
- ·Circuit state transitions (OPEN, HALF-OPEN, CLOSED) must emit metrics and alerts: a silently open circuit masks service degradation
- ·Define fallback behavior before enabling the circuit breaker: the open state must return something (cached value, degraded response, or explicit error)
- ·Per-instance state means each replica makes independent trip decisions; externalizing to Redis enables coordinated tripping at the cost of added latency
Tradeoffs
- ·False positives: transient blips can trip the circuit, causing callers to see errors the dependency could have served
- ·Half-open recovery probe rate must be conservative to avoid re-triggering overload on a recovering dependency
- ·Circuit breakers treat the symptom (connection accumulation), not the cause: the downstream issue requires separate remediation
- ·Requires explicit fallback logic at every call site, adding implementation surface area
Generator Relevance
Circuit breaker + cascading_failure mitigation is a required pairing for any architecture with synchronous downstream service calls. Architecture generator should surface circuit breaker as a mandatory companion pattern for any microservice scenario with external dependencies.
Evidence grounding
Grounded, 5 supporting itemsCircuit breakers are the canonical mitigation for cascading failure, documented in Netflix's Hystrix post-mortems and Michael Nygard's Release It!. The open state's immediate rejection is the direct mechanism that prevents connection accumulation: the root cause of most cascading failures.