Design an Online Presence Indicator Service
Develop a scalable and efficient online presence indicator Service that can accurately reflect the real-time online status of users across a platform. The service should support various statuses, including online, idle, and offline, and update these statuses dynamically based on user activity or inactivity.
Suggested time: 45 minutes
Loading the workspace...
About this problem
A green dot next to a name, trivial to display, brutal to compute at scale. 10 million users online simultaneously, each sending a heartbeat every 30 seconds to prove "I'm still here." That is 330,000 writes per second just for keepalive signals. Now multiply: when one user goes offline, every friend watching their status needs to know within one second. The core challenge is not storing state. It is propagating state changes to hundreds of friends before they notice any delay.
Key challenges the editorial covers
Learn from other designs
Design an Online Presence Indicator Service: editorial solution
Community solutions for Design an Online Presence Indicator Service
Related problems
Design Pastebin (easy)