Quick reference
- Timeout: p99 of the dependency plus one round trip.
- Retry budget: retries as a share of successes.
- Queue depth: affordable wait times arrival rate.
- Shed rate: refusals per layer, watched like an SLO.
Explained
The timeout is the first. Start from the dependency's measured p99, add one round trip, and check that the result still fits inside the caller's deadline. A timeout copied from a framework default is a guess with a unit.
The retry budget is the second. Express it as a share of successful traffic, not as a number of attempts per call, and cap it per dependency. When it is spent, the caller fails fast.
The queue depth is the third. Take the wait you can afford and multiply by the arrival rate. That is the number of items you are willing to hold, and the point at which you reject.
The shed rate is the fourth. Count what you refuse, by layer, and treat it as a signal rather than a failure. A shed rate of zero under overload usually means the database is doing the shedding.
The honest caveat: these numbers interact. A shorter timeout raises the retry rate, which raises queue depth, which raises the shed rate. Change one and re-measure the other three.
Your turn: Which of your four numbers is currently a guess?
Related on this site
More notes: Reliability patterns
Open in the notes app: search, filters, copy This note on GitHub