Design Google Street View
Capture, stitch, index, and serve immersive street-level imagery globally.
Interview tip Panorama tiles pyramid, geospatial index for coverage map, car fleet ingest pipeline, face/blur privacy processing.
① Functional requirements
- Display panorama at GPS location
- Navigate along roads
- Search places and jump to view
- Time travel (historical captures)
- Blur faces and license plates
- Download tiles for smooth pan
② Non-functional requirements
- Tile load < 100ms from CDN
- Petabytes of imagery
- Global coverage metadata index
- Privacy compliance per region
③ Back-of-the-envelope scale
Assumptions
- Petabyte imagery
- Billions of panoramas
- CDN serves 99% of tile requests
④ High-level architecture
Street View
Fleet ingest + SfM stitch
Blur privacy ML
Geo index + tile store
CDN tile delivery
⑤ Data flow & execution path
Panorama view
lat/lng → panorama id→Geo index lookup→Tile pyramid CDN→Client WebGL
S2 cells for spatial index
Historical versions per location
⑥ API & interfaces
| Endpoint / flow | Purpose | Notes |
|---|---|---|
| GET /panorama | lat,lng | returns pano id + tiles |
| GET /tiles/{id}/{face}/{z}/{x}/{y} | Cube face tiles | CDN cached |
⑦ Data model & storage
Domain-specific entities sharded by user_id or geographic key.
| Store | What | Why |
|---|---|---|
| Distributed store | Primary data | Sharded for scale |
| Kafka / Pub/Sub | Event log | Async pipelines |
| Object store | Media / blobs | GCS-style durability |
⑧ Deep dive — core components
Tile pyramid
Cube map 6 faces × zoom levels — same pattern as map tiles.
Privacy blur
ML detects faces/plates before publish — automated + human QA sample.
⑨ Trade-offs & alternatives
| Decision | Option A | Option B | Pick when |
|---|---|---|---|
| Storage | Raw + tiles | Tiles only | Tiles for serve; raw for reprocess |
| Index | S2 | Geohash | S2 uniform cells globally |
⑩ 45-minute interview script
- 0–5 min: Requirements + Google-scale assumptions
- 5–12 min: Back-of-envelope QPS and storage
- 12–22 min: Architecture diagram
- 22–35 min: Deep dive on hot path
- 35–42 min: Failure modes and trade-offs
⑪ Likely follow-up questions
| Question | Short answer |
|---|---|
| How roll out globally? | Regional cells + gradual feature rollout |
⑫ Revision checklist
- Panorama tiles
- Geo index
- CDN delivery
- Privacy blur
- Historical versions