Design Uber: location, matching, and trip service
Uber
Guided ModeStep 3 β Location Service
Request Flow
Dedicated GPS path
Driver GPS pings flow from the WebSocket gateway directly to the Location Service β bypassing the general API. Two different traffic profiles, two different paths.
Separate write load
Location writes are small (lat/lng + timestamp), high-frequency, and spatially indexed. Trip writes are larger (full trip state), low-frequency, and transactional. Mixing them causes lock contention and connection pool exhaustion.
Foundation for geo
The Location Service is the right place to own the spatial index. In the next step we replace the DB write with Redis Geo β 100x faster for radius queries.
Why We Need This
Separation of concerns by traffic pattern: 250K GPS updates/second is a streaming ingestion problem. 300 trip writes/second is OLTP. They need different storage engines, different scaling strategies, and different failure modes.
Key Insight
Separate services by traffic pattern, not just functionality. GPS ingestion and trip management have opposing access profiles β combining them means both suffer.
Step 3 of 8
