Code RoomOrder-dispatch queue
MediumPrep Room Coding #3126

Order-dispatch queue

System designDistributed systemsMid–Senior~35 min

Design the order-dispatch queue for a food-delivery platform that routes ~50k new orders/min at peak to a fleet of courier-assignment workers. Each restaurant's orders must be processed in the sequence they were placed, assignment must complete within 2 seconds p95, and a worker crash must not silently drop an order. Walk through the queueing topology, how you preserve per-restaurant ordering without serializing the whole system, and how you handle a poison order that repeatedly fails assignment.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.