Design Active Now Presence Indicators for Messenger

Last updated: November 29, 2026

Quick Overview

Design the system that shows whether a user's contacts are currently active in Messenger and when they were last seen, for billions of users with frequent connect and disconnect events.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that shows whether a user's contacts are currently active in Messenger and when they were last seen, for billions of users with frequent connect and disconnect events.

Presence is a deceptively simple Meta prompt: the fan-out of a single status change to hundreds of friends is the hard part. Interviewers check whether you reason about heartbeat costs, flapping mobile connections, and when to push versus pull.

What the Interviewer Expects
  • Define presence state precisely: online, idle, last-active timestamp
  • Use heartbeats or connection state with a timeout instead of trusting disconnect events
  • Choose push for visible contacts and pull for everything else
  • Debounce flapping connections on mobile
  • Respect privacy settings that hide activity status
Key Topics to Cover
Heartbeats
Pub/sub fan-out
Debouncing
Soft state
Privacy controls
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you limit fan-out for users with 5,000 friends?
  • How does presence work across multiple devices for one user?
  • What would you change to show presence inside group chat headers?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: show a green dot for contacts active in the last few minutes, show "Active 12m ago", let users turn activity status off. Non-functional: staleness under about 30 s is fine; presenc...

High-Level Design
  • Clients hold a persistent connection (MQTT-style) to Edge Gateways.
  • Gateways send presence updates to a Presence Service, sharded by user_id, storing `user_id -> {state, last_active, dev...

Submit Your Answer
Markdown supported