Layer 3 · Go deeper · 11 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 ETAs a second if every app open computed fresh?
What does precomputing per H3 cell cost instead?
How much location traffic comes in, and how much goes out?
Build-up · 5 steps
Build the high-level design
One functional requirement at a time, ending with a design that works for one city at modest load.
Step 1 of 5
See who can deliver now
The feed doesn’t compute, it looks up: it maps you to an H3 cell and reads that cell’s list. A builder per city rewrites every list each minute from kitchen load, partner supply and traffic.
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
“It’s 8 pm and thousands open the app at once. How do you decide which restaurants each person sees?”
Your move. Pick an approach:
Deep dive 2 of 6
Interviewer
“Your model predicts 33 minutes for this biryani, with a spread of 6. What time do you promise at checkout?”
Your move. Pick an approach:
Deep dive 3 of 6
Interviewer
“Orders arrive all evening, and the food isn’t ready when they do. How do you decide which partner gets each, and when?”
Your move. Pick an approach:
Deep dive 4 of 6
Interviewer
“Two orders from one restaurant, placed minutes apart, go to customers 1–2 km apart. When should one partner carry both?”
Your move. Pick an approach:
Deep dive 5 of 6
Interviewer
“The customer has paid, and the restaurant never taps Accept. Who cancels the order and refunds the money?”
Your move. Pick an approach:
Deep dive 6 of 6
Interviewer
“Heavy rain at 8 pm on an IPL night. Demand jumps and partners shelter under flyovers. What do you do?”
Your move. Pick an approach:
Build-up · 9 steps
Follow one biryani to the door
Only a key lookup and an order write sit on the customer’s path. ETAs, dispatch and refunds happen off to the side and catch up through events.
Step 1 of 9
Browse
The app sends its location; the feed service maps it to an H3 cell and reads that cell’s restaurants and ETA bands. About 2,500 reads a second at the dinner peak cost one lookup each.