
Ride Booking (Uber / Ola)
System Design: Ride Booking (Uber / Ola) π§ Mental Model Uber is two concurrent real-time systems: location tracking and driver matching . Every second, millions of drivers push their GPS coordinates. When a rider requests a trip, the system finds the closest available driver, atomically assigns them, and keeps both maps in sync β all under 300ms. The hardest problems are concurrency (preventing double-booking) and geospatial search at scale. ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β FAST PATH β ββββββββββββ β βββββββββββββββββ GEORADIUS ββββββββββββββββ β β Driver ββββΊβ β Location Svc β ββββββββββββΊ β Match Engine β βββΊ Driver β β App β β β (Redis Geo) β β (top K score)β notified β ββββββββββββ β βββββββββββββββββ ββββββββ¬ββββββββ β every 3-5s β β SETNX (atomic lock) β ββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ β βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββ β RELIABLE PATH β β Trip event βββΊ Kafka βββΊ Trip DB (Postgres)
Continue reading on Dev.to
Opens in a new tab




