Layer 3 · Go deeper · 7 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
Does checkout’s retry loop fit inside the gateway’s 1-second budget?
One request needs answers from 100 servers. How often is it slow?
Build-up · 5 steps
Watch one tap become 243 database calls
One user action through a five-layer call chain, while the database at the bottom browns out.
Step 1 of 5
Five layers, three tries each
A tap crosses five layers to reach the database, and each makes up to three attempts per call. Defaults like this hide in SDKs, RPC frameworks, sidecars and load balancers.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“You call inventory 2,000 times a second. Its p50 is 8 ms, p99 40 ms, p99.9 90 ms. Where do you set the timeout?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Your charge call times out after the request was sent. The customer is still watching the spinner. What does your client do?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A database failover makes 1,000 clients fail at the same moment. How should they time their retries?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“In a full outage, three attempts per request nearly triples the load on a dependency that’s already down. How do you cap it?”
Your move. Pick an approach: