Design Mention Notifications for Comments in Very Large Facebook Groups
Last updated: November 29, 2026
Quick Overview
Design how @mentions in posts and comments generate notifications in Facebook Groups, including mentioning a single member and @everyone style mentions in groups with millions of members.
Meta
November 29, 20260
0
0 solved
Design how @mentions in posts and comments generate notifications in Facebook Groups, including mentioning a single member and @everyone style mentions in groups with millions of members.
Groups are a major Facebook surface and mentions combine parsing, permissions, and fan-out. Interviewers want to see that you resolve mentions safely at write time and treat broadcast mentions as a separate, rate-limited path.
What the Interviewer Expects
- Parse and resolve mention entities at write time
- Check that the mentioned user can see the content
- Handle edits that add or remove mentions
- Treat group-wide mentions with admin permission and fan-out limits
- Deduplicate with reply notifications
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What if a comment is edited to add five more mentions?
- How do you stop spam mentions of strangers?
- How does @everyone work in a group of 2M members?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: typing @ offers member suggestions; on post, mentions are stored as structured entities; mentioned users get a notification linking to the comment; admins can use a group-wide mention....
High-Level Design
- Client sends comment text with entity spans
[{offset, length, user_id}]chosen from typeahead; the server does not trust free text. - Comment service validates each entity (user exists, is...