Layer 3 · Go deeper · 12 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 many price-and-stock lookups a second at a sale peak?
How much media does a sale peak pull?
How many orders and order events a second?
How lopsided are price reads and seller writes?
Build-up · 6 steps
Build the high-level design
One functional requirement at a time, ending with a store that works end to end in one region at moderate traffic.
Step 1 of 6
Browse and search
Images and scripts carry a content hash in their URL, so the CDN caches them for a year. Everything else passes a gateway and BFF; a category page is just a search query with a category filter.
6 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 6
Interviewer
“At a sale peak, 230,000 product pages a second make 2.3M internal calls. How do you hold a 200 ms p99?”
Your move. Pick an approach:
Deep dive 2 of 6
Interviewer
“A phone has RAM, a saree has fabric and length, a spark plug a thread size. How do you store their attributes?”
500 million products, sold by many sellers who each describe the same item differently.
Your move. Pick an approach:
Deep dive 3 of 6
Interviewer
“Result pages and buy boxes need 3.6 million stock badges a second. Where do they come from?”
Your move. Pick an approach:
Deep dive 4 of 6
Interviewer
“Checkout hands you a placed order. It lives for days, crosses half a dozen teams and must never be lost or done twice. How?”
Your move. Pick an approach:
Deep dive 5 of 6
Interviewer
“A seller in Surat drops a kurta from ₹1,299 to ₹999. How does every cache and index hear within seconds?”
At a sale peak, repricers send about 30,000 such changes a second.
Your move. Pick an approach:
Deep dive 6 of 6
Interviewer
“Big Billion Days opens at midnight and traffic jumps tenfold in one step. How do you stay up?”
Your move. Pick an approach:
Build-up · 7 steps
Follow one page view and one order
The read side answers from memory in every region; the writers sit below; Kafka in the middle is the only way facts move between them.
Step 1 of 7
Media and shells
Images, scripts, styles and, for anonymous visitors, product shells come straight from the CDN. About 99% of them never reach an origin.