Design Real-Time Location Sharing Between Friends in Google Maps
Last updated: November 29, 2026
Quick Overview
Design the feature where a user shares their live location with chosen contacts for a period of time, and those contacts see the user's position update on a map, with strong privacy controls and low battery use.
0
0
0 solved
Design the feature where a user shares their live location with chosen contacts for a period of time, and those contacts see the user's position update on a map, with strong privacy controls and low battery use.
Location sharing combines real-time fan-out with sensitive data, which makes it a good Google design question. The interviewer checks update frequency choices, push versus poll, access control at every read, and battery-aware client behavior.
What the Interviewer Expects
- Define sharing grants with expiry and instant revocation
- Choose update cadence adaptively based on motion and viewers
- Store only latest location with short retention
- Deliver updates to active viewers efficiently
- Enforce access checks on every read
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you avoid draining battery when nobody is watching?
- How quickly must revocation take effect?
- How would you scale a user sharing with 50 people?
- What do you show when the sharer's phone is offline?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Sharer picks contacts and a duration (1 hour, until turned off).
- Viewers see location, accuracy, battery level, last updated time.
- Updates every few seconds when actively viewed and moving; much...
High-Level Design
- Sharing service: stores grants
(sharer, viewer, expires_at)in Spanner. - Location ingest: phones send updates to a regional endpoint, written to a latest-location store keyed by share...