Skip to content
WebsiteHosting.com

concept Backend & software

Retry storms and jitter under partial outage

Four clients, eight retries, two timing patterns. See why spreading retries can complete more requests during recovery without reducing the amount of work sent.

Latest recorded source check · P0134

What it means

A retry storm happens when clients repeat failed requests at about the same time, sending a burst of extra work to a service that may still be recovering. Backoff makes each client wait before trying again. But if all clients fail together and wait the same amount of time, even a long wait can leave them synchronized.

Jitter varies the wait so that retries need not arrive together. That changes when the service receives work. A retry budget answers a different question: how much extra work are clients allowed to send?

Try it

Simulation: Four clients each send one request at slot 0. The service cannot complete any request before slot 4. Starting at slot 4, it can complete two requests per slot. Each client may retry twice, the four clients share a budget of eight retries, and slot 7 is the deadline: no attempt can start at or after it. Slots are units of simulated time, not seconds.

Retry storms and jitter under partial outage

Demonstrate how synchronized retries amplify a recovering service's load

Simulation
Modeled outcome: Unfinished

Some clients remain unfinished: inspect deadline, retry budget and capacity rather than assuming success.

Retry storms and jitter under partial outage: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Attempts at each modeled time slot

Deadline and remaining work

  1. Deadline (exclusive)7
  2. Service ready slot4
  3. Retry attempts used8
  4. Retry budget remaining0
  5. Completed clients2
  6. Unfinished clients2
Time slotAttemptsrequestsAcceptedrequestsFailedrequests
0404
2404
6422

Counts are attempted, accepted and failed requests in this reproducible schedule. Initial attempts do not consume the retry budget. The omitted slots have no recorded due clients.

Evaluated inputs

Required scenario evidence
provided
Maximum backoff
4 slots
Initial backoff
2 slots
Clients in synthetic cohort
4 count
Global retry budget
8 attempts
Exclusive client deadline
7 slots
Recovery begins at slot
4 slot
Max retries per client
2 count
Backoff schedule
synchronized
Service capacity after recovery
2 req/slot

Closed tiny workload (at most 12 clients), no live traffic. Initial attempts at zero, no service before stipulated recovery, after recovery first requests up to slot capacity complete instantly. Deterministic spread uses a reproducible 1..delay offset, not random jitter. Shared budget counts retries, original attempts not charged; no side effects or real service policy.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

  1. Start with synchronized. Look at slots 4 and 6. The service has capacity in both slots, but all four clients return at slot 6. Only two finish.
  2. Change only Backoff schedule to deterministic-spread. Two clients now arrive at slot 4 and one at slot 6. All three of those attempts succeed. Compare the retry counts: both schedules use eight retries and leave zero in the budget.
  3. Use Reset to return to the original synchronized example. The comparison below also works as a static example without the controls.

Where the extra completion comes from

The initial backoff is two slots, and the maximum backoff is four. On the synchronized schedule, all four requests fail at slot 0, wait two slots, and fail again at slot 2. The next wait doubles to four slots. Measured from the failure at slot 2, that puts every client's last retry at slot 6, not slot 4.

The table counts attempts sent and requests completed. Their difference is the number of attempts that failed in that slot. Slots with no attempts on either schedule are omitted.

SlotSynchronized: sent / completedSpread: sent / completed
04 / 04 / 0
10 / 02 / 0
24 / 03 / 0
40 / 02 / 2
64 / 21 / 1

On the spread schedule, a client's number determines its wait within each backoff window. For example, client 0 waits one slot after each failure. It retries at slots 1 and 2 and has no retries left when recovery begins. Client 2 also retries first at slot 1, but then waits three slots and reaches the service at slot 4. These fixed offsets make the comparison reproducible; they are not samples of random jitter.

Both schedules turn four original requests into twelve attempts. Spreading the retries completes three requests instead of two because some retries reach otherwise unused capacity at slot 4, not because the service got faster. It does not rescue the client that used both retries before recovery.

What stops a retry?

A scheduled retry is not necessarily an attempt. With the synchronized defaults except for a retry budget of zero, the four originals still run and fail. Four retries come due at slot 2, but none is sent. That slot has zero attempts, not four more failures.

Now consider the original budget of eight and a deadline of slot 2. The first retries are due at the deadline, so the simulation ends without attempting them. Again no client finishes, but this time all eight retries remain in the budget. A limit on waiting, a limit on retries per client, and a shared budget can each stop work for a different reason.

Each table row separates work actually attempted from useful completions. A due slot can appear with zero attempts when the retry budget has been exhausted. That is not another failure by the service: no request was sent in that slot. To diagnose this synthetic case, keep the retry budget and the service capacity separate.

In practice

To understand a suspected retry storm, compare original requests, retry attempts, and useful completions over the same intervals in existing records. A total of eight retries alone would not distinguish the two schedules above. Ask when those retries arrived relative to recovery, whether callers still had time left, and which retry limit applied. If the timing or capacity evidence is missing, leave the cause open rather than inferring it from the total. Do not generate retry traffic against a real service to reproduce this example.

Check where retries are counted, too. A per-request limit bounds repetition for one request; a process-wide budget bounds retries across requests sharing that budget. If one layer retries a call and the next layer retries each of those attempts, the number of attempts downstream can multiply. This simulation has just one retrying layer and a fixed group of at most twelve clients.

Finally, a missing reply does not prove that an operation had no effect. Resolve an uncertain outcome before repeating an operation that might apply the same change twice. The simulation models no such effects: recovered capacity completes the first arrivals that fit in each slot immediately. Use the example to distinguish a burst from a shortage of retry attempts, not to choose production settings. Timing determines whether retries meet available capacity; the budget and deadline determine whether those retries can be sent at all.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Does jitter eliminate the cost of retries?

No. It changes when attempts occur. Extra work and repeated side effects still need limits; this model counts retry attempts separately.

Why cap exponential backoff?

Without a bound, the next attempt may occur after the caller has stopped waiting. The model also enforces an independent exclusive deadline and retry budget.

Should every failure be retried?

No. Retry only when the error policy permits it and the operation is safe to repeat or its uncertain outcome can be resolved. A missing reply does not establish that the operation had no effect. Set a finite retry budget and deadline.

Is deterministic spread the same as random jitter?

No. Fixed offsets make this example reproducible; production jitter uses a chosen distribution and retry policy. One deterministic schedule completing more clients does not prove a distribution will always do better or that repetition is safe.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. AWS Builders Library: Timeouts, retries and backoff with jitter

    Retries and side effects; backoff and jitter. Timeouts, retries and backoff respond to partial failures; retries can amplify work and repeat side effects. Jitter spreads aligned attempts rather than guaranteeing a particular recovery time.

    Checked .

  2. Google SRE: Addressing cascading failures

    Retries; Latency and deadlines. A per-request retry limit and a process-wide budget address different sources of amplification; retrying at multiple layers can multiply total attempts.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.