System Design Masterclass
Ride Sharinggeolocationreal-timeetamapswebsocketsadvanced

Design ETA and Live Location Sharing

Design Uber-style ETA calculation and live location sharing

Millions of location updates/sec|Similar to Uber, Lyft, DoorDash, Google Maps, Grab|45 min read

Summary

Live location sharing and ETA calculation are core to ride-sharing, delivery, and logistics apps. The challenge is processing millions of location updates per second, computing accurate ETAs using real-time traffic, and pushing updates to riders with sub-second latency. This problem tests your understanding of real-time systems, geospatial indexing, and streaming architectures.

Key Takeaways

Core Problem

This is fundamentally a real-time streaming problem with geospatial indexing. Every driver location update must reach the right riders within milliseconds.

The Hard Part

Fan-out at scale: when a driver moves, potentially thousands of nearby users need updates. Naive broadcast does not scale.

Scaling Axis

Scale by geographic region (geo-sharding). Each shard handles a geographic area, reducing cross-shard communication.

The Question: Design a system that shows live driver location to riders and calculates accurate ETA, similar to Uber or Lyft.

This problem has two interconnected parts:

  1. Live Location Sharing: Driver app sends GPS coordinates, rider app displays driver position in real-time on a map
  1. ETA Calculation: Estimate arrival time based on current location, destination, route, and real-time traffic conditions

Both must work at massive scale (millions of concurrent rides) with low latency.

What to say first

This is a real-time geospatial streaming problem. Before I design, let me clarify the scale, latency requirements, and what happens during network issues. I will address location ingestion, storage, fanout to riders, and ETA computation separately.

Hidden requirements interviewers are testing: - Can you handle high-throughput location ingestion? - Do you understand geospatial indexing (quadtrees, geohash)? - Can you design efficient pub/sub for location updates? - Do you know how ETA calculation actually works (graph algorithms, traffic data)? - How do you handle offline/reconnection scenarios?

Premium Content

Sign in to access this content or upgrade for full access.