Retry storm

On this page 7

A retry storm is a self-reinforcing failure in which clients, workers or workflow engines retry failed requests so aggressively that the extra traffic overwhelms an already degraded service and keeps it from recovering. In reliability engineering for automation, it is one of the most common ways a short, local incident turns into a prolonged, system-wide outage.

The paradox is that every individual retry looks reasonable. The damage comes from many independent callers retrying at once, often at several layers of the same call chain, so the total load grows far beyond normal demand exactly when capacity is lowest.

How a retry storm develops

A retry storm develops through a positive feedback loop between failures and load. A dependency slows down or starts returning errors, callers time out and retry, the retries add load, latency rises further, and more calls fail, which triggers still more retries.

  1. A trigger event reduces capacity, such as a database failover, a slow deployment or a sudden traffic spike.
  2. Timeouts and errors rise, and each caller applies its retry policy.
  3. Effective load multiplies, because one user action now produces several requests.
  4. Queues and connection pools fill, so even healthy requests wait and time out.
  5. The service cannot drain the backlog, and the outage persists after the original trigger has ended.

The last step explains why retry storms are dangerous. The system enters a metastable failure state: it would be stable at normal load, but the retry traffic alone keeps it overloaded. Operators often have to shed load or block traffic deliberately before the service can recover.

Retry amplification across layers

The most destructive form of a retry storm comes from retries at several layers of one request path. When each layer retries independently, the attempts multiply rather than add, so a modest policy at each level produces an extreme total.

The table below shows how total attempts against the deepest dependency grow when every layer makes three attempts in total, meaning one call plus two retries.

Layers that retryAttempts per layerTotal attempts per user action
One layer33
Two layers39
Three layers327
Four layers381
Attempts reaching the deepest service

In automation platforms, the layers are often hidden. A workflow engine retries a step, the step calls an integration connector that retries internally, the connector uses an HTTP client with its own retries, and a service mesh may retry again. The practical rule is to retry at only one layer, usually the one closest to the business decision.

A retry storm overlaps with several other reliability concepts, and precise naming helps teams choose the correct countermeasure. The comparison below separates it from patterns that are often confused with it.

PatternCore mechanismTypical triggerMain countermeasure
Retry stormFailed calls are repeated and multiply loadDependency slowdown or errorsBackoff, jitter, retry budget
Thundering herd problemMany clients act at the same momentCache expiry, restart, scheduled jobRandomized timing, request coalescing
Cascading failureOverload spreads from one service to othersResource exhaustionBulkheads, load shedding
Poison message loopOne bad message fails and is redelivered endlesslyMalformed or unprocessable inputDead letter queue, attempt limit
Related failure patterns

The patterns often occur together. A thundering herd after a restart can cause the first errors, and synchronized retries then turn the herd into a storm. Poison messages differ because they fail for a deterministic reason, so retrying them never helps.

Preventing retry storms

Prevention relies on limiting, spreading and stopping retries before they exceed the capacity of the dependency. No single technique is sufficient; robust systems combine several controls so that each covers the gaps of the others.

ControlHow it helpsTypical setting
Exponential backoffIncreases the wait after each failureBase 100 ms to 1 s, capped at 30-60 s
Retry jitterRandomizes waits to desynchronize clientsFull jitter across the backoff window
Retry budgetCaps retries as a share of normal trafficAbout 10-20 percent extra load
Circuit breakerStops calls to a failing dependencyOpens after an error-rate threshold
Attempt limitBounds work per request or messageUsually 3-5 attempts
Server-side load sheddingRejects excess work early and cheaplyPriority queues, 503 with Retry-After
Controls that contain retry storms

Idempotency is a prerequisite rather than a control. Retries are only safe when a repeated request cannot charge a customer twice or create a duplicate record, so automation designers should use idempotency keys and message deduplication for every retried side effect.

Servers can actively help clients behave. Returning 429 or 503 with a Retry-After header tells well-behaved clients when to try again, and distinguishing retryable errors from permanent ones prevents futile retries on validation failures or authorization errors.

Detecting a retry storm in progress

A retry storm is visible in metrics as a gap between incoming user demand and actual request volume. When user traffic is flat but calls to a dependency double or triple, retries are the likely cause.

  • Retry rate per caller, ideally emitted as a separate metric from first attempts.
  • Request volume ratio between the edge and internal dependencies.
  • Queue depth and age in message brokers and workflow engines.
  • Error rate that persists after the original trigger, such as a completed failover, has ended.

The usual emergency response is to reduce retry pressure first: pause scheduled workflows, disable retries through feature flags, open circuit breakers manually or rate-limit at the edge. Adding capacity alone often fails, because new instances are overwhelmed as soon as they join.

Explained without jargon

Imagine a shop with a jammed front door. Every customer who fails to get in immediately tries again, and soon a crowd is pushing on the door so hard that staff cannot open it at all.

A retry storm is the same thing in software. Programs that keep repeating failed requests make the problem bigger instead of solving it. The cure is to wait longer after each failure, spread out the attempts and sometimes stop trying for a while.

A typical use case

An online retailer runs order automation in a workflow engine that calls an inventory service, which in turn calls a database. During a routine database failover lasting about 40 seconds, the inventory service times out. The workflow step retries five times, the inventory client retries three times, and the database driver retries twice, so each order produces up to 30 database attempts.

The failover completes, but the database receives roughly ten times its normal query rate and stays saturated for 25 minutes. Engineers finally pause the order workflows, which lets the database drain its backlog within two minutes.

The post-incident fix keeps retries only in the workflow step, adds exponential backoff with full jitter, introduces a retry budget of 10 percent, and puts a circuit breaker in front of the inventory service. A later failover drill causes under a minute of delayed orders and no extended outage.