Timeouts and deadlines
Set timeouts from latency data, fit retries inside a caller's deadline, and propagate the remaining budget down the call chain so no one works for a client that left.
25 min7 steps
By the end you can
- Set a per-try timeout from the dependency's latency distribution and fit all attempts inside the caller's deadline
- Propagate a deadline down a call chain and compute the budget left for each hop
- Explain what an overlong timeout holds hostage and what a too-short timeout wastes
Every remote call needs a timeout
Set the timeout from the latency distribution
- p5020 ms
- p99120 ms
- p99.9300 ms
What an overlong timeout holds hostage
Stuck calls
rate x timeout
100/s x 10 s = 1,000
Result
pool exhausted
even unrelated requests fail
Loading question…
Retries must fit inside the deadline
0-1 s
Attempt 1 times out
1-2 s
Attempt 2 times out
2 s
User gone
2-3 s
Attempt 3: wasted work
Loading question…
Propagate the deadline, not a fixed timeout
Loading question…
Stop work nobody is waiting for
Check your mastery
Little's law
ms to s first
Last attempt
no sleep after
Score 80% or more. In the sandbox, give a call to a slow service a long timeout, watch queueing climb, then shorten it.
Mastery check
5 questions on fresh variants. One attempt each, no time limit. Score 80% or more to master the lesson.
Answer this step to continue.