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.
At 100,000 reads a second, how many misses reach the database?
What does fan-out-on-write cost when a celebrity posts?
50,000 keys load at 10:00 with a 300 s TTL. When do they expire?
Build-up · 6 steps
Climb the ladder, one rung at a time
The sale-day product page, from one slow primary to a layered read path. Each step adds one rung and says what it buys and what it costs.
Step 1 of 6
Fix the queries
Index the access path, fetch all ten authors in one query and select only what you render. One node goes from about 300 to 5,000 views a second.
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
“Sale day needs 100,000 product views a second, and one node serves about 5,000. The team wants more read replicas. Your call?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Asha saves a new delivery address, and the reload shows the old one. What do you change?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Your database is sized for 1,000 misses a second behind Redis. The cache cluster goes down. What happens, and what’s your plan?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“At 12:00 the hero deal draws 100,000 reads a second on one cache key, more than one shard can take. What do you do?”
Your move. Pick an approach: