techdiagrams.net
← All templates

The retry storm (anti-pattern)

What NOT to build: synchronized retries, an inner timeout longer than the caller's, a shared cache TTL and no jitter — watch one slow database become a full cascade.

Open in editor — free, no login Download JSON
CASCADING FAILURE DOMAIN — SPREADING LEFT3s timeout · retry ×3 · no jitterwaves, not a streamall keys miss at onceherd: 10k misses together30s inner vs 3s outerstill working for dead callers10k clientsretry ×3 · no jitterLoad balancerhealthy — and helplessAPItimeout: 30s (!)CacheTTL expired at :00Databaseconnections exhaustedService Bunbounded queue · growingfour mistakes, one outage:1. no jitter → retries arrive as synchronized waves2. inner timeout > outer → zombie work fills every thread3. shared TTL → cache stampede at the worst moment4. no retry budget → load ×4 exactly when capacity is lowestthe fix is the 'Anatomy of a safe RPC' template:jittered backoff · timeout ladder · retry budgets ·stampede protection · load shedding.

What this design does

This is the outage you've lived through, drawn honestly. Ten thousand clients retry every 3 seconds with no jitter, so the load arrives in synchronized waves. The API's 30-second timeout outlives the client's 3 seconds, so servers keep working for callers that already gave up. Every cache key expires at the top of the hour, so the herd stampedes the database at once — and retries multiply traffic exactly when the system is sickest. Import it, then fix it: jittered backoff, a timeout ladder, retry budgets and stampede protection turn this diagram into the safe-RPC template.

The patterns it composes

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.