System DesignSep 24, 2026⏱️ 3 min read
Design Google Maps: Vector Tiles, Hierarchical Routing & Real-Time ETA

Design Google Maps: Vector Tiles, Hierarchical Routing & Real-Time ETA

Routing Across 1 Billion Kilometers of Road in Milliseconds

Standard textbook Dijkstra's or A* algorithms work nicely on a city map of 50,000 intersections. Run A* across a planetary road graph containing hundreds of millions of road segments and intersections, and a single coast-to-coast route query could scan tens of millions of nodes—taking minutes instead of 200ms.
Google Maps solves both visual map rendering and ultra-fast pathfinding through aggressive spatial tiling and graph pre-computation.
Google Maps Vector Tiles & Routing Architecture

Google Maps Vector Tiles & Routing Architecture


1. Map Rendering: Raster vs. Vector Tiles

Early online maps served pre-rendered 256×256 PNG raster images for every zoom level (0 = whole Earth in 1 tile, up to zoom 21 = trillions of building-level tiles).
Modern maps stream lightweight Vector Tiles (Protocol Buffers containing polygon geometries, road vectors, and labels):
  • 5×–10× Smaller Bandwidth: Client GPU renders smooth 60fps zoom/rotation transitions without fetching blurry intermediate PNGs.
  • Deterministic Addressing with Geohashes: Map tiles are cached globally on CDN edge nodes and addressed deterministically from (lat, lon, zoom), allowing clients to prefetch neighboring tiles smoothly before you pan!

2. Sub-Second Shortest Path: Hierarchical Routing Tiles

To navigate from San Francisco to New York in milliseconds without loading the entire planet's graph into RAM:
  1. Partition the World into Routing Tiles: Slice road graphs into zoom-tiered Routing Tiles (Local streets, Regional arterial roads, National highways) stored in S3 and cached in memory on Routing Servers.
  2. Hierarchical Graph Traversal (Contraction Hierarchies):
    • Start at Origin (Zoom 2 local tile) → immediately jump onto nearby arterial roads (Zoom 1 regional tile) → ascend onto interstate highways (Zoom 0 continental backbone) → cross the country examining only major highway interchanges → descend cleanly at Destination!
    • By bypassing millions of neighborhood cul-de-sacs along the middle of the route, search space shrinks by 1,000×–10,000×!

3. Live Traffic, Adaptive ETA & Dynamic Rerouting

Static road lengths fail during rush hour or highway collisions:
  1. Batch GPS Ingestion: Mobile clients batch anonymous (lat, lon, speed, ts) telemetry pings every ~15 seconds into a Kafka stream (~200K+ QPS).
  2. Traffic Update Service: Stream processors aggregate road-segment speeds in real time, updating edge weights on cached Routing Tiles and publishing live Traffic Tiles for red/yellow/green UI overlays.
  3. ETA Prediction & Adaptive Rerouting:
    • ETA Service: Uses historical patterns + ML time-of-day congestion models to forecast arrival times along the chosen road segments (not just current instantaneous speed).
    • Rerouting: Active navigation sessions subscribe to periodic route re-evaluations—whenever a downstream road weight spikes past a savings threshold, the server pushes a faster detour automatically.

Share this article

Comments