Report #104247
[architecture] How to design a retry mechanism that doesn't cause a thundering herd or overload a downstream service?
Implement exponential backoff with jitter. Start with a base delay \(e.g., 100ms\). Multiply by 2 for each attempt. Add random jitter \(e.g., ±50%\) to prevent synchronization of retries. Cap the maximum delay \(e.g., 30s\). Use a limited number of retries \(e.g., 3-5\). For critical operations, implement a circuit breaker pattern to stop retrying entirely when the downstream service is clearly down.
Journey Context:
Simple linear retries or fixed delays are a disaster. They cause the thundering herd problem: when a service comes back up, all clients retry at the same time, taking it down again. Exponential backoff spreads this out. Jitter prevents the 'lumpiness' of exponential backoff. Common mistake: retrying on non-retryable errors \(4xx client errors\). Only retry on 5xx server errors or network timeouts. The circuit breaker adds a safety valve to prevent wasted resources. The tradeoff is increased latency for the client, but it saves the whole system from cascading failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-19T20:06:53.089080+00:00— report_created — created