Design Google Maps

Expert60 min
1 / 30
understanding6 min read

Problem Statement & Global Maps Context

Google Maps — Problem Statement & Global Maps Context

Problem Statement & Global Maps Context

Google Maps is a planet-scale navigation platform that fuses a static road graph, continuously refreshed traffic overlays, place search, and guidance sessions. A route_id is the immutable answer artifact returned by the routing tier; clients poll guidance endpoints while driving, never recomputing Dijkstra on the phone for continental graphs.

Interviewers expect you to separate map display (vector tiles, styles) from path computation (Contraction Hierarchies / Customizable Route Planning) from freshness (probe ingest + ML ETA). Uber/Lyft depend on this stack for driver ETAs—your design should show how fleet APIs differ from consumer latency budgets.

Design anchors (sec-001)

  • road graph shard: measurable invariant for Google Maps at this step.
  • route_id contract: measurable invariant for Google Maps at this step.
  • traffic overlay version: measurable invariant for Google Maps at this step.
  • turn-by-turn guidance session: measurable invariant for Google Maps at this step.

Operational metrics

Track route_compute_p99_ms, traffic_generation_age_sec, reroute_churn_rate, and tile_cdn_hit_ratio. Page when generation age exceeds 300s in urban cells—ETAs drift and reroute storms spike QPS.

javaOne Dark Pro
1public final class RouteRequest1 {
2 public String originPlaceId;
3 public String destPlaceId;
4 public Instant departureTime;
5 public String profile; // car, two_wheeler, truck
6 public long graphVersion;
7 public long trafficGeneration;
8}
pythonOne Dark Pro
1def pick_shard(lat: float, lon: float, registry: dict) -> str:
2 # Simplified: production uses polygon index
3 cell = f"{int(lat * 100)}:{int(lon * 100)}"
4 return registry.get(cell, "global-default")
typescriptOne Dark Pro
1export interface GuidancePoll {
2 routeId: string;
3 cursor?: string;
4 snappedSegmentId: string;
5 clientTrafficGeneration: number;
6}

Why interviewers care

Google Maps interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem Statement & Global Maps Context that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • road graph shard: maps-design anchor
  • route_id contract: maps-design anchor
  • traffic overlay version: maps-design anchor
  • turn-by-turn guidance session: maps-design anchor
Pro tip
Lead with road graph shard when discussing Problem Statement & Global Maps Context—interviewers reward measurable contracts.
Interviewer loves
Quantify trade-offs in Problem Statement & Global Maps Context; avoid hand-waving 'we'll use microservices'.

Section Rescue Kit

Buzzwords to use:

Contraction HierarchiesTraffic generation

Safe statements:

  • "If Problem Statement & Global Maps Context gets pushback, restate: versioned graph publish, pinned route_id, CDN tiles decoupled from CH."
  • "I can degrade to static fastest-path with explicit traffic_stale rather than failing navigation."
Design Google Maps - System Design | WinJob | WinJob