Learn
Lesson · Availability and Failure · Budgets and retries

Retry Storms

Load raises the failure rate, the failure rate raises the amplification, and the amplification raises the load. Iterating that map from an offered load of 0.95 of capacity, with three retries and a ten per cent base failure rate, walks 0.95 → 1.06 → 1.11 → 1.17 → 1.24 and settles at 1.727 — above capacity, from a starting point that was comfortably inside it. The retries are not a response to the overload; they are the overload.

p(L) = base + (1 − base)·max(0, (L − C)/L) failure rises with load L′ = λ · (1 − p(L)ʳ⁺¹)/(1 − p(L)) retries raise the load λ = 0.95 C, base = 0.10, r = 3 → fixed point 1.727 C the failure rate there is 0.479 and the amplification 1.818
A map from load to load, and where it settles

Core ideas

What this lesson establishes

Two functions from the last two lessons, composed. Neither is new; the composition is, and so is the answer it lands on.

1

Failure rises with load, by a model you state

Above capacity the server cannot finish everything inside a client's patience, and the share it does finish is C/L, so the failure probability is base + (1 − base)·(L − C)/L. Below capacity it is just base. That is this lesson's model, stated rather than assumed, and the lab evaluates it rather than drawing a curve someone liked the shape of.

2

Composing the two gives a map from load to load

L′ = λ · attempts(p(L)). Feed a load in, get the failure rate it causes, get the amplification that failure rate produces, multiply the original offered load by it. The result is the load the service actually sees, and feeding it back in is one step of the iteration. Three steps by hand are enough to see which way it is going.

3

The fixed point can sit above capacity when the offered load did not

Starting at 0.95 of capacity with three retries and a 10% base failure rate, the iteration passes capacity on its first step and settles at 1.727. Nothing external changed: the offered load was serviceable throughout, and the policy meant to protect requests is what is drowning the service. Switching the retries off returns the load to 0.95.

The material

The loop, the iteration and the fixed point

How the two earlier formulas compose into a feedback loop, what iterating it looks like, and why a bracket answers a question the iteration cannot afford to.

Definition · The retry-storm map

Write C for capacity, λ for the offered load before retries, base for the failure probability under no overload and r for the retry count. Define p(L) = base + (1 − base)·max(0, (L − C)/L) and L′ = λ · (1 − p(L)ʳ⁺¹)/(1 − p(L)). A fixed point is a load with L′ = L; the system's steady state is such a point, if one exists below the ceiling λ(r + 1).

Capacity is the unit: every load on this page is a multiple of C, so C = 1 and the offered load λ = 0.95 means ninety-five per cent of capacity. The base failure rate is what the service returns when it is not overloaded — a small tail of genuine errors, here ten per cent, which is high enough to make the iteration visible in five steps.

Five steps of the map, by hand

λ = 0.95, C = 1, base = 0.10, r = 3 step load in p attempts load out denominator digits 1 0.95000 0.10000 1.11100 1.05545 5 2 1.05545 0.14728 1.17217 1.11356 13 3 1.11356 0.19178 1.23562 1.17384 39 4 1.17384 0.23328 1.30040 1.23538 119 5 1.23538 0.27148 1.36519 1.29693 358 the first step alone crosses capacity: 0.95 × 1.111 = 1.05545

Work step two by hand and the loop stops being a metaphor. The load is 1.05545, so the overload share is (1.05545 − 1)/1.05545 = 0.05254, and the failure rate is 0.1 + 0.9 × 0.05254 = 0.14728. Four attempts at that rate cost 1 + 0.14728 + 0.02169 + 0.00319 = 1.17217, and 0.95 × 1.17217 is 1.11356. Every figure in the row came from the row above it.

The last column is worth a sentence of its own. The amplification carries the r-th power of the failure rate's denominator, so each step cubes it at r = 3: five digits, then thirteen, thirty-nine, a hundred and nineteen, three hundred and fifty-eight. By the seventh iterate the exact fraction has over three thousand digits, and the table stops and says so rather than silently rounding.

Bracketing the fixed point instead of iterating to it

The iteration cannot reach the answer, so the lab does not use it to. The map is increasing in L and bounded above by λ(r + 1), so the function g(L) = L′ − L is non-negative at λ and non-positive at λ(r + 1), and a root is trapped between them. Bisection evaluates the map afresh at each probe, so nothing compounds and the denominators stay small.

λ = 0.95, base = 0.10, r = 3 fixed point bracketed at 1.72736 ≤ L* ≤ 1.72736 failure rate there p = 0.47897 amplification there 1.8183 with the retries switched off 0.95000 check: 0.95 × 1.8183 = 1.72739 ≈ L* ✓

The result is an enclosure rather than a rounded number: the fixed point is at least the lower bound and at most the upper one, and both ends are exact fractions. At this setting the two ends agree to five decimal places, which is why the readout prints the same figure twice.

Example · The service that could have served the load

0.95 of capacity was serviceable. With three retries the system settles at 1.727 of capacity and a 47.9% failure rate — and that failure rate is what sustains the amplification that produced the load. Turn the retries off in the lab and the load returns to 0.95 immediately. The overload has no external cause at all, which is exactly why it does not end when the original trigger does.

Where the transition is

It is not gradual. At the same 10% base rate and three retries, an offered load of 0.80 settles at 0.8888 and one of 0.90 settles at 0.9999 — both below capacity and stable in a single step. 0.95 settles at 1.727. The system is fine, fine, and then eighty per cent over capacity, and the parameter that moved was five per cent of offered load.

Example · The retry count as the control

Hold the offered load at 0.95 and vary only the policy: with no retries the fixed point is 0.95, with one retry 1.168, with two 1.439, with three 1.727. Every one of those is the same traffic against the same service. The policy is not a response to the overload in any of the last three cases; it is the whole of it.

Interactive

Retry storms

A feedback loop, iterated to its fixed point — which can sit above capacity

The retry stormload feeds failure feeds retries feeds load — iterate it and see where it lands
the iteratescapacitythe fixed point

Method

Iterating the loop

Three of these are arithmetic you already have. The fourth is the question the arithmetic was for.

1

State the failure model and the capacity

Write down what failure probability each load produces, and in what units capacity is measured. This lesson uses p(L) = base + (1 − base)(L − C)/L above capacity and base below it; a different model gives different numbers and the same shape of conclusion, but it has to be written down either way.

2

Apply the map by hand three times

Failure rate from the load, amplification from the failure rate, load from the amplification times the original offered load. Three iterations are enough to see the direction, and doing them by hand is what makes the fourth believable.

3

Find the fixed point by bracketing, not by iterating

The map is increasing and bounded by λ(r + 1), so bisect between the offered load and that ceiling. Iterating instead compounds the exact fractions until they are unusable, and rounding them is how a divergence gets reported as a convergence.

4

Compare the fixed point with capacity, and with the offered load

Above capacity is a storm; below it the policy is affordable. Then compare with the load that would have applied with no retries at all, because that difference is the part the system did to itself and the only part a policy change can remove.

Loops and fixed points

Score 0 / 0

Two retries at 90% offered load, and what one more retry does

A service running at ninety per cent of capacity with a five per cent base failure rate. The question on the table is whether to raise the retry count from two to three to improve a customer-visible error rate.

C = 1, λ = 0.90, base = 0.05 r = 2 step 1 L = 0.90 ≤ C so p = 0.05 attempts = 1 + 0.05 + 0.0025 = 1.0525 L′ = 0.90 × 1.0525 = 0.94725 step 2 L = 0.94725 ≤ C so p = 0.05 again L′ = 0.94725 → unchanged, this is the fixed point fixed point 0.94725, below capacity, stable r = 3 step 1 attempts = 1 + 0.05 + 0.0025 + 0.000125 = 1.052625 L′ = 0.90 × 1.052625 = 0.9473625 fixed point 0.9473625, below capacity, stable now the same two policies at λ = 0.98 r = 2 fixed point 1.38247 above capacity r = 3 fixed point 1.63311 above capacity

At ninety per cent offered load the extra retry is nearly free: the fixed point moves by one part in ten thousand and stays well inside capacity, because the load never crosses C and so the failure rate never leaves its base value. The feedback term is switched off entirely in this regime, which is why the policy looks harmless.

At ninety-eight per cent the same two policies both storm, and the one with the extra retry storms harder. The decision therefore is not about the retry count at all — it is about how close to capacity the service is allowed to run, because that is what decides whether the loop is engaged.

For a faded rehearsal, keep base = 0.05 and r = 2 and find the offered load at which the fixed point first exceeds capacity. The supplied first move is that while L ≤ C the map has the constant amplification 1.0525, so the loop only engages once λ × 1.0525 > 1. Solve that inequality by hand, then check the value against the lab's bracket by stepping the offered-load slider across it.

Common mistakes

1
Believing the retries stop when the service recoversThey are what prevents it recovering. At λ = 0.95 with three retries the fixed point is 1.727 of capacity and the failure rate there is 47.9% — a failure rate the retries themselves are sustaining. Removing the original trigger changes nothing, because the offered load was never the problem; switching the retries off returns the load to 0.95 at once.
2
Sizing capacity against the offered load rather than the fixed point0.95 of capacity is the load a capacity plan would record. What arrives is 1.727 of capacity, and the ceiling λ(r + 1) is 3.80. A headroom figure that does not include the amplification is measuring traffic the system does not actually receive on the day it matters.
3
Iterating the exact map to find the fixed pointEach step raises the failure rate to the (r + 1)-th power, so the denominators cube: five digits, thirteen, thirty-nine, a hundred and nineteen. The seventh iterate has over three thousand, and rounding to carry on is how a diverging iteration gets reported as a converging one. Bracket the root instead — the map is increasing and bounded, so a sign change traps it.

Check your understanding

✓
Finish when you would ask for a system's fixed point rather than its offered load.

You should be able to state the failure model, apply the map by hand for three steps, bracket the fixed point between λ and λ(r + 1), and say how much of the resulting load is the system's own doing rather than its users'.

Note: The loop is closed by two different mechanisms and they are not alternatives. Spreading the retries in time is one, and “Backoff and Jitter” shows that the spreading, not the delay, is what actually cuts the peak. Refusing work at the door is the other, and that is “Load Shedding”.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.