Design Ola's Driver Location Tracking System at Scale
Problem
Design the backend system that tracks the real-time location of 2 million Ola drivers across India and serves this data to the matching and dispatch systems.
Requirements
Functional:
- Drivers send GPS location every 5 seconds
- Nearest available driver lookup by location + vehicle type
- Historical route replay for dispute resolution
- Driver heatmap for demand forecasting
Non-functional:
- 2M active drivers at peak
- 400K location updates/second
- Nearest driver query < 100ms
- Location history retained for 90 days
Discussion points
- Location ingestion: UDP vs WebSocket vs HTTP
- Geospatial indexing: Redis GEO commands, geohash, S2 cells
- Write-heavy storage: time-series DB (InfluxDB) vs append-only Cassandra
- Serving layer: in-memory grid for hot queries
- Historical storage tiering: hot (7 days) → warm (90 days) → cold
added …