25,000 Orders/min Peak
Sustained peak request volume during high-traffic events.
Orchestrate real-time food delivery between customers, restaurants, and couriers with batched routing and live order tracking.
Target production parameters expected in a senior or staff interview round.
Sustained peak request volume during high-traffic events.
Daily active users generating read and write operations.
Projected data ingestion and replication storage capacity.
Strict end-to-end percentile latency SLA constraint.
Establish clear problem boundaries before proposing architectural components.
Step-by-step arithmetic conversions for QPS, storage, and bandwidth.
| Dimension | Calculation Formula | Estimated Result |
|---|---|---|
| Peak Order Placement Volume | 25,000 orders/minute / 60 seconds = 416 orders/sec during dinner peak | 416 orders/second peak |
| Active Courier GPS Telemetry Ingestion | 200,000 active couriers transmitting GPS coordinates every 4 seconds | 50,000 GPS telemetry updates/second |
| Daily Dispatch Optimization Solver Cycles | 5 Million daily orders * 4 state transitions (Dispatch, Pickup, In-transit, Delivered) | 20 Million state machine lifecycle events/day |
How requests navigate ingress gateways, application logic, caching, and persistence.
Serve restaurant menus with dynamic delivery radius bounding, pricing tiers, and dietary filters.
Batch multiple nearby orders, evaluate courier travel times, and issue timed 30-second acceptance offers.
Durable workflow managing: Placed -> Accepted -> Cooking -> Ready -> Picked Up -> Completed.
Snap raw courier GPS coordinates to road networks and stream smooth car icon movement to customer phones.
Entity models, indexing, and primary key partitioning.
Composite index on (restaurant_id, status) for kitchen display system order queues.
Foreign key reference on order_id.
Redis Geospatial / H3 index for instant radius lookup of available delivery drivers.
How to defend engineering compromises when challenged by interviewers.
Rationale: Greedy dispatch causes couriers to make separate trips for orders from the same restaurant. Batched optimization reduces total travel distance by 30% by bundling deliveries.
Rationale: Food delivery has dozens of timeout edges (restaurant declines, driver cancels, delivery delayed). Temporal provides bulletproof state machines with built-in retry timers without dangling orders.
Key interview questions and conceptual defenses.
If a courier rejects or lets the 30-second offer countdown expire, the dispatch engine instantly evaluates the next best candidate in the active H3 geospatial cell.
Tablets maintain persistent bidirectional connections with automatic local SMS/phone call failover alarms if an incoming order is not acknowledged within 3 minutes.