Report #62427
[architecture] How do I prevent a slow downstream service from overwhelming my application and causing cascading failures?
Wrap external HTTP/RPC calls in a Circuit Breaker \(e.g., Hystrix, Resilience4j, Polly\) that opens after a threshold of errors \(e.g., 50% failure rate over 10 seconds\), fails fast for a cooldown period, and half-opens to test recovery before closing.
Journey Context:
Without circuit breakers, retries on a struggling downstream service create 'retry storms' \(amplification of load\), exhausting connection pools and threads, leading to total system outage \(cascading failure\). Timeouts alone aren't enough because they still consume resources waiting. A circuit breaker acts as a proxy that 'trips' like an electrical fuse. Important: it must record failures across a rolling window \(not just consecutive\), allow half-open state \(single probe request to test health\), and trigger fallback logic \(degraded mode, cache, or queue\). Common mistake: setting thresholds too sensitive \(tripping on transient blips\) or not sharing breaker state across instances \(each pod has own breaker, doesn't protect downstream from aggregate load\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:16:07.395041+00:00— report_created — created