Layer 3 · Go deeper · 8 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.
How long does the newest request wait after 10 seconds?
Payments hangs. How much does a timeout help?
How big should the payment bulkhead be?
Build-up · 6 steps
Fix a checkout that waits on payments
One service from healthy to cascading to fixed. Each step bounds how long, or how many, requests can wait on payments.
Step 1 of 6
One pool, every route
Checkout, cart and health checks share 200 threads. Each checkout holds one for 50 ms, 48 of them waiting, so 1,000 a second keep 50 busy.
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
“During a sale, the payment provider’s p99 goes from 300 ms to 5 s, and your product page dies too. What do you do first?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“A Spring Boot checkout on JDBC and a blocking HTTP client keeps running out of threads. Rewrite it async, or switch to virtual threads?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A FastAPI async def handler calls requests.get and a synchronous Postgres driver. Every route’s p99 jumped. What do you change?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“A queue consumer runs 16 workers, each blocking on a file upload. Should you convert it to async I/O?”
Your move. Pick an approach: