DoorDash: Friday Dinner Rush
Hard · system design problem
Dinner rush triples orders for three minutes — more writes than the orders primary can take — and halfway through, the payment provider browns out.
Diners browse menus and place orders through order-api (10 MySQL connections per instance), which charges the card with payment provider A and writes the order to MySQL (primary + 2 replicas, 151 connections, shards fixed). Couriers report their location through courier-api into Cassandra. At T+20s the Friday rush starts: diners ×3 and couriers ×2.5 for three minutes. At T+60s provider A browns out: slow responses and throttling. You also hold a contract with provider B (not wired in). A placed order may be confirmed up to two minutes later; a failed one is lost. The run is graded on the whole rush.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.