Skip to the guide

Design maps and ETAs (like Google Maps)

AdvancedCase study12 pages

A user pans a map, asks for directions to a town 300 km away, and gets three routes whose arrival times already know about the jam on the motorway. Then a voice guides her turn by turn. It's a road atlas that redraws itself every minute from the cars driving on it.

It's also asked as "design Google Maps", "design a navigation app" or "design an ETA service". The closest case studies are Nearby places, which finds what's on the map, and Ride hailing, whose matching calls this service for every candidate. Interviewers like it because the naive algorithm is thousands of times too slow, the map itself is a CDN problem, and live traffic is a pipeline whose writes are easy to miscount.

Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.

Step 1 · Clarify the features and cut the scope

Minutes 0–5 · How this step works

Interviewer: Design Google Maps.

You: That's a big product, so a few questions first. Is it the map, directions, or both?

Interviewer: Both: the map, and driving directions with arrival times.

You: Live traffic in those times, and turn-by-turn navigation that reroutes?

Interviewer: Yes to both.

You: Do other services call us for travel times, a ride app ranking drivers, say?

Interviewer: Yes, at volume.

You: Then I'll cover map tiles, driving routes with ETAs, live traffic from phones, navigation with rerouting, and an ETA API for other services. Out: place search, transit, Street View and offline maps. OK?

Interviewer: Good.

Each answer shapes the design: the map means tiles on a CDN, routes mean a precomputed road graph in memory, traffic means a pipeline from phones, and the ETA API means one-to-many queries at high rates.

Step 2 · Non-functional requirements

Minutes 5–8 · How this step works

You: Say 200 million daily users, with 20 million navigating at the evening peak. A route answers within 200 ms at our servers for 99% of requests, tiles and routing are 99.99% available, and navigation keeps guiding on the phone when the network drops. A new jam reaches new routes within about two minutes, and a phone already navigating within about three.