Real-time driver-rider matching
Your task
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.
It covers
- Geospatial index
- Matching
- Low latency