Layer 3 · Go deeper · 9 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.
A request fans out to 100 servers. How often is it slow?
5% of requests hang for 100 s. How many still get served?
Build-up · 6 steps
Place a defence where each failure lands
Follow one order request from the client to the queue, adding the patterns in the order the request meets them.
Step 1 of 6
One order, one shared pool
An order crosses the gateway into the order service, which calls a payment API, the orders database and a queue. One shared pool serves every call, so one slow dependency can drain it.
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
“Your payment provider has slowed down, and now every endpoint is dragging. What do you change?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“It’s 10 am and the tatkal window opens. Traffic far outruns capacity. What protects checkout?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A feature reads through a cache on each web server. What should it do when the cache is unhealthy?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Under load, your pods start restarting in a loop. How should their health checks work?”
Your move. Pick an approach:
Build-up · 5 steps
Draw the circuit breaker
The pattern you’ll be asked to draw. Three states, and a rule for the retries around it. Thresholds and timers are illustrative.
Step 1 of 5
Closed: count failures
Calls pass through while the breaker counts failures in a rolling window. The counter is time-based, so scattered errors never trip it; only a burst inside the window does.