Design a Presence Status Service for Google Workspace Users
Last updated: November 29, 2026
Quick Overview
Design the service that shows whether a Workspace user is active, idle, in a meeting, or offline across Gmail, Chat, Meet, and Calendar. Status should propagate to viewers within a few seconds.
0
0
0 solved
Design the service that shows whether a Workspace user is active, idle, in a meeting, or offline across Gmail, Chat, Meet, and Calendar. Status should propagate to viewers within a few seconds.
A lighter Google design question often used in screens to see if a candidate can reason about heartbeats, TTLs, and subscription fan-out. The interviewer wants a clean, bounded design rather than heavy machinery.
What the Interviewer Expects
- Use heartbeats with TTL to derive online and idle states
- Merge signals from multiple devices and products into one status
- Push changes only to users who are viewing that person
- Keep presence in memory with no strong durability needs
- Give rough numbers for heartbeat QPS
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 would Calendar-derived 'In a meeting' status be merged in?
- What if a user wants to appear offline?
- How do you avoid a thundering herd when a region reconnects?
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
Show a status dot for any user in rosters, chat headers, and Docs share dialogs. States: Active, Idle (no input for 10 min), In a meeting (Calendar or Meet), Do not disturb, Offline. Latency target: u...
High-Level Design
- Each client sends a heartbeat every 30 s with
device_idandlast_input_tsto a Presence Service sharded by user_id (consistent hashing). - The shard holds `user -> {device -> (last_seen, las...