ProblemReal-time and messaging
Food delivery
NewOrder food from nearby restaurants, pay by UPI or cash, and watch a delivery partner bring it to your door.
The brief
Food delivery · suggested for Mid-level
Design a food delivery app
Design a food delivery app: customers in about 500 Indian cities order from nearby restaurants and pay by UPI, card, wallet or cash on delivery; the restaurant accepts and cooks; a delivery partner collects the order and brings it; and everyone follows the order as it moves, with no order lost or charged twice.
You run engineering for a food delivery app in India. In about 500 cities, customers open the app, see the restaurants that deliver to their address right now, browse menus (dishes with sizes and add-ons), and pay by UPI, card, wallet or cash on delivery. About 300,000 restaurants take orders on a tablet in the kitchen: they accept or reject each one and mark it ready. About 400,000 delivery partners, around 150,000 of them online at the dinner peak, collect orders on their bikes and bring them to the door; their phones report where they are every 4 seconds. Customers watch their partner on a map and see an arrival time from checkout on. About 3 million orders a day, most within 7 km, with the dinner peak between 8 and 9 pm running at about three times the day’s average, more when it rains. Design the system, from a customer opening the app to the food at their door.
Functional requirements
- CoreCustomers see restaurants that deliver to their address now, browse menus (dishes with sizes and add-ons), and order and pay by UPI, card, wallet or cash on delivery.
- CoreThe restaurant gets the order on its tablet, accepts or rejects it, and marks it ready.
- CoreA delivery partner is assigned, collects the order and delivers it; the customer sees the partner on a map and an arrival time.
- CoreCustomer, restaurant and partner hear about every step; customers can cancel, and get refunds for missing items.
Non-functional requirements
- DurabilityA placed order is never lost or charged twice: it ends delivered, or cancelled and refunded.
- ConsistencyEach order has one delivery partner at a time.
- Quality9 in 10 orders arrive within the time shown at checkout.
- LatencyThe restaurant list loads in under 300 ms (p99), and the partner’s position on the map is at most about 5 seconds old.
- AvailabilityAt the peak, the app shows longer times or fewer restaurants rather than taking orders it can’t deliver; one city’s outage never touches another.
Scale
- ScaleAbout 500 cities, 300,000 restaurants and 3 million orders a day; most orders are within 7 km.
- ScaleThe dinner peak, 8 to 9 pm, runs at about three times the day’s average.
- ScaleAbout 400,000 delivery partners, about 150,000 online at the peak, each phone sending its position every 4 seconds.
Nice to mention (below the line)
- Below the lineSearch ranking and recommendations.
- Below the lineRestaurant onboarding and partner payouts.
- Below the lineRatings and reviews.
- Below the lineGrocery and quick commerce.
Out of scope
- Out of scopePartner onboarding and KYC.
- Out of scopeRestaurant payouts.
- Out of scopeAds.
The variant
One fully specified brief, with the level it suits best. You can practise it at any level.
- Food deliverySuggested for Mid-level
Food delivery across 500 Indian cities: from a customer’s tap to food at the door, through a kitchen that may not answer, a rainy dinner rush and a city going down.
8 steps · 6 must-pass · about 43 min at Mid-level
What each level is graded on
Food delivery, step by step. A result at a level needs its must-pass steps answered, and only the steps you answer count. Going up a level adds steps or holds them to a stricter bar.
| Step | Entry level | Your levelMid-level | Senior | Staff |
|---|---|---|---|---|
| The numbers that shape it | Graded | Graded | Graded | Graded |
| Menus, orders and partners | Graded | Graded | Graded | Graded |
| Ordering, and hearing back | Graded | Must-pass | Must-pass | Must-pass |
| An order, from tap to doorstep | Must-passcan block | Must-passcan block | Must-passcan block | Must-passcan block |
| What's open near me | Must-pass | Must-pass | Must-pass | Must-pass |
| The kitchen goes quiet | Must-passcan block | Must-passcan block | Must-passcan block | Must-passcan block |
| A partner at the counter as the food is ready | — | Must-pass | Must-pass | Must-pass |
| “Arriving in 32 min”, kept | — | Must-pass | Must-pass | Must-pass |
| Saturday, 8 pm, and it starts to rain | — | — | Must-pass | Must-pass |
| Two orders, one partner | — | — | Must-pass | Must-pass |
| A city goes dark | — | — | — | Must-pass |
| At this level | 6 steps 3 must-pass about 31 min | 8 steps 6 must-pass about 43 min | 10 steps 8 must-pass about 55 min | 11 steps 9 must-pass about 62 min |
Entry level6 steps · 3 must-pass · about 31 min
- The numbers that shape itGraded
- Menus, orders and partnersGraded
- Ordering, and hearing backGraded
- An order, from tap to doorstepMust-passcan block
- What's open near meMust-pass
- The kitchen goes quietMust-passcan block
Mid-levelYour level8 steps · 6 must-pass · about 43 min
- The numbers that shape itGraded
- Menus, orders and partnersGraded
- Ordering, and hearing backMust-pass
- An order, from tap to doorstepMust-passcan block
- What's open near meMust-pass
- The kitchen goes quietMust-passcan block
- A partner at the counter as the food is readyMust-pass
- “Arriving in 32 min”, keptMust-pass
Senior10 steps · 8 must-pass · about 55 min
- The numbers that shape itGraded
- Menus, orders and partnersGraded
- Ordering, and hearing backMust-pass
- An order, from tap to doorstepMust-passcan block
- What's open near meMust-pass
- The kitchen goes quietMust-passcan block
- A partner at the counter as the food is readyMust-pass
- “Arriving in 32 min”, keptMust-pass
- Saturday, 8 pm, and it starts to rainMust-pass
- Two orders, one partnerMust-pass
Staff11 steps · 9 must-pass · about 62 min
- The numbers that shape itGraded
- Menus, orders and partnersGraded
- Ordering, and hearing backMust-pass
- An order, from tap to doorstepMust-passcan block
- What's open near meMust-pass
- The kitchen goes quietMust-passcan block
- A partner at the counter as the food is readyMust-pass
- “Arriving in 32 min”, keptMust-pass
- Saturday, 8 pm, and it starts to rainMust-pass
- Two orders, one partnerMust-pass
- A city goes darkMust-pass
- Must-pass
- a result at that level needs this step answered.
- Can block
- a miss there is a Blocking issue at that level.
Going up a level
- Mid-level
- “Ordering, and hearing back” becomes must-pass.Adds “A partner at the counter as the food is ready”, must-pass.Adds “Arriving in 32 min”, kept, must-pass.
- Senior
- Adds “Saturday, 8 pm, and it starts to rain”, must-pass.Adds “Two orders, one partner”, must-pass.
- Staff
- Adds “A city goes dark”, must-pass.
Skills this problem practises
Your coach tracks readiness per skill across every problem you practise. Each links to the lesson that teaches it.
- Capacity estimation
- API design
- Idempotency and retries
- Data modelling
- Choosing storage
- Sharding and partitioning
- Stream processing
- High-level architecture
- Networking and protocols
- Caching
- Traffic surges and backpressure
- Consistency and concurrency
- Failure modes and recovery
- Observability and operations
- Latency budgets
Worked solution
Try it first: practise a variant, then read the walkthrough and compare it with your own design. Reading it first makes the practice much less useful.
Learn: Design a food delivery appYour history
Sign in to see your sessions on this problem.