Code RoomCourier offer and reassignment
HardPrep Room Coding #3531

Courier offer and reassignment

System designDistributed systemsSenior–Staff~50 min

Design the offer/acceptance and reassignment layer of a courier-dispatch system. After the matcher picks a courier for an order, the courier may decline or not respond, the restaurant may be slow, or the courier may go offline mid-route. You need to offer the order, time out non-responses, fall back to the next-best courier, and reassign in-flight orders when a courier drops, all while never delivering an order twice and never leaving an order stuck. ~5k orders/min per metro. Describe the offer state machine, timeout/escalation handling, reassignment correctness, and the trade-off between waiting for a preferred courier and falling back fast.

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.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.