A detailed walkthrough of how to design a navigation system like Google Maps for a system design interview. Covers functional requirements (routing, ETA, distance), non-functional requirements (availability, accuracy, scale with ~1B MAU), and core architectural concepts. Introduces the 'Segment' abstraction — dividing the globe into 1km x 1km grid cells — and explains how Floyd-Warshall is used to precompute intra-segment shortest paths, while Dijkstra runs across segment exit points for inter-segment routing. Mega-Segments add a recursive hierarchical layer for cross-city or cross-country navigation. The design addresses dynamic weight updates (traffic, weather, accidents) as modifiers to average speed rather than direct graph weights, enabling a pluggable architecture. System components include WebSocket handlers for location pings, Kafka-based streaming pipelines, Spark Streaming jobs for road discovery and average speed calculation, Graph Processing Service, Historical Data Service, and Third Party Data Manager. Also touches on analytics, ETA accuracy measurement, vehicle type inference, and handling geopolitically disputed regions.

1h 1m watch time
5 Impressions