Code RoomPresence status service
MediumPrep Room Coding #3812

Presence status service

System designDatabases & SQLNetworking & APIsMid–Senior~40 min

Design a presence / online-status service (the 'green dot' — online / away / offline / typing) for a social or chat app with 100M users, where each user's status must propagate to their friends/contacts within ~2 s. Status changes are extremely high-volume (every connect/disconnect/idle), reads are even higher (rendering buddy lists). How do you track who's online, detect disconnects, and fan status changes out to watchers efficiently?

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:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.