Design Notification Aggregation Like Alex and 12 Others Liked Your Photo

Last updated: November 29, 2026

Quick Overview

Design how Facebook groups many similar activity events (likes, comments, reactions) on one object into a single updating notification instead of sending one per event.

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

0

0

0 solved


Design how Facebook groups many similar activity events (likes, comments, reactions) on one object into a single updating notification instead of sending one per event.

This tests the read and write paths behind Meta's notification tray, which is a core engagement surface. The interviewer wants a clear aggregation key, a story for updating an existing notification, and control over how often the user is pinged.

What the Interviewer Expects
  • Define an aggregation key and window
  • Explain how an existing tray item is updated in place
  • Decide when an update also triggers a push
  • Choose actor names to display (friends first)
  • Handle unread state and ordering of the tray
Key Topics to Cover
Aggregation keys
Upserts
Debouncing
Notification tray
Read models
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 do you rank which actor names appear first?
  • What happens if a like is removed?
  • How would you aggregate across different objects, such as all photos in an album?
  • How do you keep the tray fast for a user with 50k notifications?
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: events like like(actor, object, owner) become tray items keyed by object and verb. The item shows the top 1 or 2 actors plus a count, moves to the top of the tray on new activity, an...

High-Level Design
  • Event log: reaction and comment services publish events partitioned by owner_id, so all events for one recipient are ordered on one partition.
  • Aggregator workers consume per owner and up...

Submit Your Answer
Markdown supported