Presence system at scale
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.
Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8: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.