Design Food Delivery
HardSystem design · Marketplace Realtime · DoorDash
Design a food delivery platform like DoorDash or Uber Eats. Customers order from restaurants, restaurants accept and prepare, couriers pick up and deliver, and all three see live state. Scale: 500K orders/hour at peak (about 140/s) and 200K online couriers sending a position every 4 seconds. Focus on the order state machine across three parties, dispatching a courier timed to food readiness, batching, live location and ETA, and payment around failures.
Requirements
- Track one order through placed, accepted, preparing, ready, picked up and delivered with cancellation at several points
- Dispatch couriers nearby, timed to predicted readiness, optionally batching compatible orders
- Ingest live courier locations and show customers a moving map and ETA
- Handle menu availability, merchant throttling and payment failure