Presence system for team chat
Design the online/offline/away presence subsystem for a team-chat product with 30M concurrent users, where each user wants to see live presence for the members of the channels they currently have open (often hundreds of people). Requirements: presence flips within a couple seconds, a hard client crash must mark the user offline within ~30s, and you must not generate O(N²) presence traffic. Walk through state, detection, and distribution.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.
Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.