SEARCH THE LAB

What are you looking for?

ScienceReview information not provided

Why Automatic Retries After Failure Can Amplify a Local Fault into an Avalanche

Review information not provided · 3 min

Clients automatically retrying after a request fails is often treated as a well-intentioned design for improving success rates. It does rescue some sporadic …

Why Automatic Retries After Failure Can Amplify a Local Fault into an Avalanche

Clients automatically retrying after a request fails is often treated as a well-intentioned design for improving success rates. It does rescue some sporadic failures, but at the same time it does something easily overlooked: at the very moment the system has the least spare capacity, it multiplies request volume.

Start with the arithmetic. Suppose a service can handle one hundred requests per second and normally sits steady at eighty per second, with twenty percent headroom. A bout of network jitter causes some requests to time out, and those clients each retry once as configured, so requests arriving within the same second can jump from eighty to more than one hundred. Once the processing limit is crossed, the excess requests do not vanish; they enter a queue. The longer the wait, the more requests trigger timeouts, which produces another round of retries. Positive feedback is thereby established: the slower it gets, the more retries; the more retries, the slower it gets.

More importantly, queueing delay is not linear in load. Picture a supermarket with only two checkout lanes open: when customers arrive slightly slower than the checkout rate, there is almost no queue; once arrivals persistently exceed the checkout rate, the line keeps growing, and waiting time grows in ten-minute increments rather than seconds. Systems behave the same way: with ample headroom, ten percent more load means only a little more waiting; near the limit, the same increment multiplies waiting, because the queue's drain rate can no longer keep up with the arrival rate. This curve is steepest in the narrow band close to the limit, and that is exactly where failures are most likely to occur.

Amplification also comes from layering. If the client, the gateway, and the service internals each have a retry layer, three attempts per layer, then a single user request becomes twenty-seven downstream attempts in the worst case. These attempts independently consume connections, threads, and database connection pool slots, and the connection pool often runs out earlier than compute resources. At that point, even if the processors are still idle, the service can no longer accept new requests.

What is more insidious is synchronization. Large numbers of clients receive timeouts at the same moment and retry at the same moment, so the spikes land neatly in the same second. Exponential backoff with random jitter spreads the retry times out and can visibly flatten that spike; fixed-interval retries instead reproduce the same collision over and over.

So retries need a budget, not a rule of retrying whenever something fails. Retry only errors that may heal themselves, such as a connection reset or a brief timeout; explicit rejections at the business level are pointless to retry. Give retries a quota, for example no more than ten percent of normal request volume, and when the quota is used up, fail fast and expose the problem to the upstream rather than hiding it. Backoff intervals should grow with the number of failures, not stay at a fixed few seconds. Write operations need idempotency keys; otherwise one retry can become two charges or two orders.

Observability has its own traps. Counting only final outcomes records "succeeded after retry" as one success, and the failure rate of the first attempt disappears. A more reliable approach is to record attempt counts, failure reasons, and latency distributions together, so the cost of retries is visible rather than letting a handsome success rate conceal a capacity problem.

The limitations need to be stated clearly. The appropriate ratio for a retry quota depends on the real traffic structure and cannot be copied from someone else's numbers; brief network interruptions and insufficient capacity both show up as timeouts in logs, but the former is worth retrying while the latter only adds burden when retried; idempotency requires cooperation on the business side and is not established just by adding a request header; circuit breaking can cut the feedback loop, but a threshold set too loosely is as good as none, and one set too tightly will punish normal fluctuations. Retries can also stretch a brief capacity shortage into sustained overload, because every failure adds fuel to the next one. In latency-sensitive scenarios, retries push tail latency even higher, and what users experience is a normal success rate together with persistent slowness.