Geospatial
Design Uber / Lyft (Geospatial querying, matching systems)
A ride-hailing platform continuously ingesting driver GPS pings, indexing them geospatially, and matching riders to nearby drivers under tight latency budgets.
Open and Simulate this Architecture in InfraDraftCore Architectural Components
Real-Time Location Ingestion Pipeline
Absorbs a continuous stream of driver GPS pings at massive volume.
Geospatial Index
Geohash, quadtree, or H3-based index enabling fast nearby-driver queries.
Rider-Driver Matching Service
Assigns the best available driver to a ride request under time pressure.
Dynamic/Surge Pricing Engine
Adjusts price in real time based on local supply/demand imbalance.
Trip State Machine
Tracks requested → accepted → in-progress → completed, driving all downstream side effects.
ETA & Routing Service
Computes route and arrival estimates for both rider and driver.
Payment & Fare Calculation Service
Computes and charges the final fare once a trip completes.
Driver/Rider Notification Service
Keeps both sides updated on match, arrival, and trip status.