Failure handling and retry budgets
medium 4 minSet an end-to-end deadline and decide which layer owns retries.
Video lesson · Chapter 1 of 5
Three callers multiply a failure
How one failed request becomes 27 calls
1:14Reel
Theory
Read or listen first. About 1 min.
What it is
Each attempt at a higher layer can trigger a fresh set of attempts below it. To find the load during a persistent failure, trace one incoming call all the way to the last dependency.
Count the calls reaching the last service
Why it exists
Backoff spreads attempts over time. An attempt budget also caps their number, so retries cannot consume the capacity needed for recovery.
Words to know
- Attempt budget
- The maximum number of calls, including the first, allowed for one logical operation.
How it works
Step through the idea, or press Play.
Set a deadline. Reserve time for downstream work and the return path.
Understand it
Worked example
Failure handling and retry budgets in practice
Three nested services each allow three attempts. One incoming operation can produce up to 27 attempts at the deepest dependency. A single retry owner makes amplification easier to bound.
Related case
A transfer crosses two shards
An allocation moves credits between two accounts on different shards. The coordinator loses its response after asking the participants to commit.
Check the original transaction identity.