Report #28924
[architecture] How do I implement retries for failed network calls without causing a thundering herd?
Implement exponential backoff with full jitter \(random value between 0 and the calculated backoff time\) and a maximum cap \(e.g., 60 seconds\). Add a circuit breaker that stops retrying after a threshold of consecutive failures \(e.g., 5 errors\) to prevent overwhelming a struggling service. Never retry 4xx client errors except 429 \(Too Many Requests\) which should respect the Retry-After header.
Journey Context:
Simple 'retry 3 times immediately' logic creates retry storms when services flicker, amplifying traffic exactly when the target is struggling. Exponential backoff alone causes 'synchronization' where clients align on the same retry times \(thundering herd\). Adding jitter desynchronizes clients. The circuit breaker is crucial because retries are useless when the dependency is hard-down; failing fast prevents resource exhaustion. Common mistakes include retrying 400 Bad Request \(user error will never succeed\) or not implementing idempotency keys alongside retries, causing side effects on every retry attempt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:56:36.856924+00:00— report_created — created