Skip to content
SD-40 · RIDE AND COURIER MATCHING · INTERACTIVE

Break it.
Then fix it.

Bring more drivers online, watch what melts, and add the parts a real dispatch system needs. Every switch is a decision you would defend in an interview.

CHALLENGERun 1M online drivers with no errors, no double bookings and an average pickup under 5 minutes.
StatusDOWNAt 500K drivers online
Average pickup6.1 minTarget under 5 minutes
Errors52.9%Requests and GPS dropped · location age 100 s
Double bookingsNoneEach driver holds one offer
RidersLIVE
1.0K ride requests/s
traffic source
DriversLIVE
500K online · GPS every 4 s
125K updates/s
API servers × 40DOWN
Riders + driver polls
425K / 400K req/s
MatchingOK
Nearest driver first
1.0K / 4.0K matches/s
Geo indexDOWN
Drivers by map cell
145K / 100K ops/s
Trip DBDOWN
Also every on-trip GPS point
43K / 20K writes/s
Driver locksOK
Lease per offer, 15 s
1.0K reserves/s
Drivers polling are drowning the API. 500K drivers ask “any offer for me?” every 2 seconds and post GPS over plain HTTP. Keep one WebSocket per driver on connection servers and push offers down it.
250KGPS updates a second1M drivers each sending a point every 4 seconds.
200 MBWhole live index1M drivers × 200 bytes. The problem is the write rate, not the size.
15 sOffer leaseA driver holds one offer at a time; the lock expires on its own if they ignore it.
−30%Pickup time with batchingRoad ETAs and assigning 2 seconds of requests together: 6.1 down to 4.2 minutes.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.