Code Room
System designMedium
Question
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.