Code Room
System designHardsd-g003
Subject Real time systemsLevel Senior–Staff~45 minCommon in Databases & SQL · Distributed systems interviewsIndustries Technology

Question

Design the real-time driver-rider matching engine for a ride-hailing service in a dense metro: ~500k drivers streaming GPS pings every 4 seconds, riders requesting in bursts, and a hard requirement that a match decision return in under 1 second using positions no older than ~5 seconds. Describe how you index moving drivers, how a rider request finds nearby candidates fast, how you avoid double-matching one driver to two riders, and what you do when supply is far below demand in a surge cell.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.