Code Room
System designHard
Question
Design a presence system (online / idle / offline + 'typing…') for a workplace chat app with 100M users and large orgs where one user may have 5,000 contacts/teammates whose status they can see. Presence changes constantly (every tab switch, every keypress for 'typing'), and a naive fan-out — broadcast every change to every watcher — would be a write amplification disaster. How do you track and distribute presence at this scale with sub-second freshness but bounded cost?
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.