SD-27 · ETA AND LOCATION SHARING · INTERACTIVEBreak it.
Break it.
Then fix it.
Turn up the drivers, watch what breaks, and add the parts a real live-map and ETA system needs. Every switch is a decision you would defend in an interview.
CHALLENGEHandle 400K location updates/s with the car on screen within 2 s, ETA p99 under 200 ms, live traffic in ETAs, and no errors.
StatusDOWNAt 100K updates/s
Map delay3 sPing to screen, target under 2 s
ETA p991,000+ msSpeed limits only
Monthly cost$21,42096% of requests failing
DriversLIVE
400K online · ping every 4 s100K updates/s
Riders + viewersLIVE
240K live mapspoll every 2 s
Ingest × 16OK
Pings and polls220K / 320K req/s
Location store · 8 shardsOK
Latest per driver, TTL 30 s220K / 1.2M ops/s
Trips DBOK
Trips and sharestrips only
ETA servers × 40DOWN
Search on the fly, no traffic40K / 1.6K queries/s
Every ETA searches the whole road graph. About 40 queries/s per server at 900 ms. Preprocess the graph into contraction hierarchies: about 1 ms a query, 4,000 per server.
320 MBEvery driver’s latest positionTiny, but rewritten 400,000 times a second, so it lives in memory.
1 sPing to screenPushed through the trip’s channel; polling every 2 s is 3 s late.
1 msOne ETAContraction hierarchies instead of a search over millions of junctions.
30%ETA error without trafficAbout 10% with road speeds learned from pings every minute.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.