The Retry Storm: How a Small Failure Becomes a System-Wide Outage

How retries, timeouts, and overloaded dependencies can turn a temporary failure into a cascading outage—and how to design systems that fail safely.



The outage that retries created

Imagine your application depends on a database.
At 10:00 AM, the database becomes overloaded. Requests start taking longer than usual. Some time out.
Your application retries them.
The retries add more work to the database, which is already struggling. The database gets slower, causing even more requests to time out. Those requests retry too.
Soon, the database is overwhelmed—not just by the original workload, but by the workload generated by the system trying to recover.
This is a retry storm.
Retries are an important reliability mechanism. They help recover from temporary network failures, throttling, and transient service errors. But without limits, retries can amplify failures and reduce availability.
The goal is not to eliminate retries. It is to make retries controlled, bounded, and safe.

1. How a retry storm develops

Consider a simple request path:
Client
|
v
API
|
v
Application
|
v
Database
Under normal conditions, the database responds in 50 ms.
Now imagine its response time increases to 2 seconds because of a slow query or resource contention.
The application has a 1-second timeout, so requests begin timing out. Each request is retried twice.
A single incoming request can now produce up to three database calls.
If 1,000 requests arrive per second, the database may receive up to 3,000 attempts per second—while it is already struggling to handle the original 1,000.
The retry policy has increased load precisely when the system has the least capacity to handle it.
A retry storm can spread through multiple services:
API
|
v
Service A ---- retries ----+
| |
v |
Service B ---- retries ----+--> Service C
| | |
v | v
Database <-----------------+ Overloaded
The original failure may be isolated, but the retry behavior turns it into a system-wide problem.

2. Retries multiply across service boundaries

One of the most dangerous retry mistakes is configuring retries independently at every layer.
Suppose a request passes through three services:
  • API retries a failed request 3 times.
  • Service A retries its dependency 3 times.
  • Service B retries its database call 3 times.
If each number means total attempts, the worst-case number of database attempts can reach:
[ 3 \times 3 \times 3 = 27 ]
One user request may cause 27 database calls.
If each layer means three retries in addition to the initial attempt, the amplification can be even greater:
[ 4 \times 4 \times 4 = 64 ]
This is why retry policies should be designed across the request path, not just inside individual functions.
A useful rule:
Choose one layer to own retries for a particular operation whenever possible.
Lower-level libraries may still retry connection-level failures, but the total attempt budget should be understood and bounded.

3. Exponential backoff: give the dependency time to recover

Retrying immediately is usually a bad idea when a dependency is overloaded.
Instead, increase the delay between attempts.
A common exponential backoff formula is:
[ delay = \min(cap,\ base \times 2^{attempt}) ]
For example, with a base delay of 100 ms:
Retry
Maximum delay
1
100 ms
2
200 ms
3
400 ms
4
800 ms
5
1.6 s
The delay grows quickly, reducing the rate at which failed requests return.
However, exponential backoff alone has a problem.

The thundering herd

Imagine 10,000 clients all receive a failure at the same moment.
If every client waits exactly 1 second, they all retry at approximately the same time.
The dependency receives another huge burst.
This is called a thundering herd.

Add jitter

Jitter adds randomness to the retry delay.
A common strategy is full jitter:
[ delay = random(0,\ min(cap,\ base \times 2^{attempt})) ]
Instead of retrying at exactly 1 second, clients retry at different points within the backoff window.
This spreads traffic over time and reduces synchronized bursts. AWS recommends combining exponential backoff, jitter, and a retry limit.  AWS Well-Architected 

4. Timeouts are resource protection

A timeout is not just about making the user wait less.
It protects resources.
A request waiting indefinitely may occupy:
  • A connection from a connection pool
  • A worker thread or event-loop task
  • Memory for request and response state
  • A slot in a queue
  • A database connection
As more requests wait, the application can run out of resources even if the downstream service eventually recovers.
But setting a timeout too aggressively creates another problem: healthy requests may be cancelled and retried unnecessarily.
A good timeout should be based on the expected latency of the operation and the overall request deadline.

Use a deadline, not just independent timeouts

Suppose an API request has a total deadline of 2 seconds.
It calls Service A, which calls Service B.
If every layer independently gets a 2-second timeout, the full request may take much longer than 2 seconds.
Instead, propagate the remaining deadline:
Incoming request deadline: 2 seconds

API
|
| remaining: 1.8s
v
Service A
|
| remaining: 1.1s
v
Service B
Each layer should use the time remaining, not reset the clock.
This prevents retries from continuing long after the original request is no longer useful.

5. Retry only failures that might recover

Not every error is temporary.
Failure
Retry?
Connection reset
Often
Temporary DNS/network failure
Often, with limits
HTTP 503
Often
HTTP 429 throttling
Usually, respecting retry guidance
Validation error
No
Authentication/authorization error
Usually no
Resource not found
Usually no
Business-rule rejection
No
A retry should have a reason to believe the next attempt might succeed.
For throttling responses, respect server-provided retry timing when available. If the server says to wait, immediately retrying is counterproductive.
Also be careful with operations that modify data.
A timeout does not prove that the operation failed. The server may have completed the operation but lost the response.
Retrying a payment, order creation, or resource provisioning request could duplicate the effect.
Use idempotency keys, deduplication, or conditional writes where appropriate.

6. Retry budgets: stop retrying when the system is unhealthy

A maximum attempt count is useful, but it does not always protect a system during a prolonged outage.
Imagine every request is allowed three attempts. During a major failure, every request consumes all three attempts.
A retry budget limits how much additional traffic retries can create.
For example:
  • Allow retries only for a small percentage of recent successful requests.
  • Reduce the retry budget as failures increase.
  • Stop retrying when the budget is exhausted.
  • Restore the budget gradually as successful requests return.
This is different from a per-request retry limit.
A per-request limit says, “This request can retry twice.”
A retry budget says, “Across the system, retries must not consume unlimited additional capacity.”
AWS SDK standard retry behavior includes a retry quota that can stop retries during sustained failures, allowing clients to fail faster rather than continually adding load.  AWS SDK retry behavior 

7. Circuit breakers: temporarily stop calling a failing dependency

A circuit breaker adds another layer of protection.
It typically has three states:
CLOSED
|
| failures exceed threshold
v
OPEN
|
| wait for recovery interval
v
HALF-OPEN
|
| test request succeeds
v
CLOSED
  • Closed: Requests flow normally.
  • Open: Requests fail fast without calling the dependency.
  • Half-open: A limited number of test requests are allowed to check recovery.
A circuit breaker prevents an application from repeatedly calling a dependency that is clearly unhealthy.
But it must be configured carefully.
If every instance opens and closes its circuit at exactly the same time, all instances may send test traffic together and recreate the overload.
Use jittered recovery intervals and limit half-open probes.
A circuit breaker is not a replacement for backoff or retry limits. It complements them.

8. Queue-based systems need backpressure too

Retries are not limited to synchronous HTTP requests.
Consider a worker consuming messages from a queue.
Queue ---> Worker ---> Database
The database becomes slow.
The worker fails messages and returns them to the queue. Messages become visible again and are retried. More workers may start processing them, increasing database load.
The queue may hide the immediate failure, but it does not remove the underlying capacity problem.
Useful controls include:
  • Limit worker concurrency.
  • Use bounded retry counts.
  • Apply exponential backoff to message retries.
  • Move repeatedly failing messages to a dead-letter queue.
  • Monitor queue age, not only queue depth.
  • Pause or reduce consumption when the dependency is unhealthy.
Backpressure means slowing or stopping upstream work when downstream capacity is insufficient.
A queue is not infinite capacity. It is a buffer that can eventually fill.

9. AWS SDK retries: useful defaults, but know what they do

AWS SDKs already implement retry behavior for many transient and throttling errors.
As of November 10, 2026, AWS has made updated retry behavior the default for supported SDKs and tools. Standard mode uses exponential backoff with jitter and a retry quota; the exact behavior and availability can vary by SDK and version.  AWS announcement 
For a Node.js application using AWS SDK v3, inspect the retry configuration rather than adding another retry loop around every SDK call.
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";

const client = new DynamoDBClient({
maxAttempts: 3,
});
 maxAttempts  includes the initial request. A value of  3  means one initial attempt and up to two retries.
If you add your own retry wrapper around an SDK client, account for both layers. Otherwise, you may unintentionally multiply attempts.
Also remember that SDK retries cannot fix application-level overload. You may still need concurrency limits, queue buffering, circuit breakers, or a better database connection strategy.

10. A practical retry policy

For a typical service-to-service request, start with a policy like this:
  1. Set a total request deadline.
  1. Set a per-attempt timeout that fits within the deadline.
  1. Retry only transient or explicitly retryable failures.
  1. Use exponential backoff with jitter.
  1. Keep the maximum number of attempts small.
  1. Use idempotency for operations with side effects.
  1. Add a retry budget or circuit breaker for critical dependencies.
  1. Monitor retry rate separately from request rate.
The exact values depend on the workload. A latency-sensitive API and a background job should not necessarily use the same retry policy.

11. What to monitor during an outage

A service can look healthy at the request level while generating enormous internal retry traffic.
Track:
Metric
Why it matters
Original request rate
Shows incoming demand
Attempt rate
Reveals retry amplification
Retry ratio
Shows how much traffic is being generated by retries
Timeout rate
Indicates requests are exceeding deadlines
Dependency latency
Shows downstream degradation
Circuit-breaker state
Shows when calls are being blocked
Queue age
Reveals delayed work and backlog
Connection-pool wait time
Shows resource exhaustion
A useful metric is:
[ retry\ ratio = \frac{retry\ attempts}{original\ requests} ]
If the retry ratio suddenly increases from 0.02 to 2.5, your system is making 2.5 extra attempts per original request on average.
That is a strong signal to investigate.

Conclusion

Retries are a powerful tool, but they are not free.
Every retry consumes capacity, occupies resources, and may duplicate work. During an outage, uncontrolled retries can become part of the failure itself.
A resilient system does more than retry failed requests. It knows when to retry, how long to wait, how much additional load it can afford, and when to stop.
The most important design principle is simple:
When a dependency is struggling, your system should reduce the pressure—not amplify it.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article