Scope
Functional
- Discover restaurants that deliver to my location; browse menus; search dishes.
- Cart, checkout, payment; restaurant accepts/rejects; partner assigned; live tracking; delivery.
- Order history and status notifications.
Non-functional
- Discovery p99 < 300 ms. Order placement highly available (it's the revenue path).
- Accurate ETAs; no orders lost or charged twice.
- 3× traffic spikes at lunch/dinner; 10× on big events.
Size
- 5M orders/day, 70% within 4 peak hours → ~250 orders/s at peak.
- Discovery: 50M sessions/day × 10 queries → ~6k/s avg, ~20k/s peak.
- 300k active delivery partners × location every 5 s → 60k writes/s.
Services
The 30-second summary
Say it in the interview
"Discovery uses a search index with geo-shaped delivery zones and a fast serviceability cache. Ordering is an orchestrated saga: authorise payment, get restaurant acceptance, assign a partner timed to food readiness, capture on delivery, with compensations and timeouts at every step. Partner assignment batches nearby orders and uses prep-time and ETA predictions. During peaks we pre-scale, throttle overloaded kitchens and shed non-critical features."
Follow-up questions the interviewer may ask
- How do you batch two orders for one rider?
- How do you estimate delivery time at checkout?
- Restaurant menus change constantly. How do you keep search and listings fresh?
- How do you handle a dinner rush at 3× capacity?
Model answers to each of these are in the book.