System Design

Maps & ETA

Design a maps routing and ETA service like Google Maps.

Functional requirements

  • Given an origin and destination (lat/long or place ID), return the best driving route as an ordered polyline of road segments plus turn-by-turn steps.
  • Return an ETA for each route that accounts for current and predicted traffic conditions along the path, and offer up to 3 alternative routes with their ETAs.
  • Continuously update ETA and proactively reroute drivers mid-trip when traffic changes make a materially better route available.
  • Serve map tiles (rendered raster or vector) to clients at multiple zoom levels for display of the map and the route overlay.
  • Ingest road-network changes (new roads, closures, changed speed limits) and live traffic signals (probe data from driver devices, incident reports) and reflect them in routing and ETAs.

Non-functional requirements

  • Route computation p99 latency under 300 ms server-side for a single continent-scale query; tile fetches p99 under 100 ms (CDN-served).
  • Highly available for reads: routing and tiles favor availability over freshness, serving a route on 2-minute-stale traffic is acceptable; serving no route is not.
  • Traffic freshness: live probe data should influence ETAs within ~1-2 minutes; road-network edits (closures) should take effect in routing within ~5-10 minutes.
  • ETA quality target: median absolute ETA error under ~10% on trips longer than 10 minutes.
  • Location probe data must be handled with privacy in mind: anonymized/aggregated before storage, no long-term per-user trajectory retention in the traffic pipeline.

Scaling & constraints

  • 500M DAU globally; peak hours see roughly 3x average load, concentrated per-region at local commute times.
  • Average user session issues ~2 route requests and ~30 tile fetches; active navigators (~50M concurrent at global peak) send a location probe every ~5 seconds and receive an ETA refresh every ~30-60 seconds.
  • Road network: ~1B road segments (edges) and ~500M intersections (nodes) worldwide; each segment carries ~200 bytes of attributes (geometry, speed limit, turn restrictions, class).
  • Traffic state: per-segment live speed estimates retained for 24 hours; historical speed profiles kept per segment per 15-minute weekly bucket for 2 years for prediction.
  • Tile corpus: ~50 TB across all zoom levels; tiles re-rendered when underlying map data changes; read:write ratio on tiles exceeds 100,000:1.
  • Road-network edit rate: ~1M segment updates/day globally, bursty around imports from data providers.

Out of scope

  • Geocoding, place search, and autocomplete (assume a service resolves text to coordinates).
  • Multi-modal routing (transit, walking, cycling): driving only.
  • Offline maps and on-device routing.
  • Satellite/street-view imagery pipelines.

Sign in to save your progress

AI design evaluation

Get a grounded score, what your design does well, its gaps, and what to study next.

Sign in to evaluate

Sign in to get AI feedback on your design.