System Design
Advanced
Design Ride-Hailing Dispatch
Match riders and drivers using geospatial indexing, real-time location, pricing, and marketplace balancing.
45 min
3 sections
geospatial
dispatch
marketplace
1
2
3
01. Represent location as a streaming problem
Section 1 of 3
Driver locations update frequently and become stale quickly. Store current location in a fast geospatial index, persist sampled history separately, and avoid treating every update as a durable business event.
text
Dispatch data:
- Current driver location: in-memory or fast key-value geospatial index.
- Trip state: durable transactional database.
- Location history: append-only event store with retention.
- Pricing features: demand, supply, weather, region, time of day.Back to Course