Problem statement
Design the "activity" timeline that tells a user what happened to their own content — likes, comments, mentions, and new followers — with related events rolled up into compact entries such as "Alice and 40 others liked your post."
Operating context. Every like, comment, follow, or mention anywhere in the product emits an event targeted at a recipient. The recipient reads their activity timeline when they open the notifications tab. The workload is write-heavy and skewed: a celebrity post can attract millions of likes in minutes, and those must collapse into a single rolled-up entry with an actor sample and a count, never a million rows. The recipient also sees an unread badge that must stay accurate.
Out of scope. Push and email delivery of these notifications (a separate fan-out service consumes this timeline), home-feed ranking, spam and abuse filtering, and cross-device read receipts. Assume other teams own those.
What to produce. A high-level design covering: how activity events are ingested and ordered, the aggregation model that rolls same-type events on the same target into one entry, per-recipient timeline storage and cursor pagination, the unread-count mechanism, and how you absorb celebrity hot-spots without a write storm on a single key. Sketch the components and data flow; checkpoints will probe the rollup model and hot-target handling.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design HLD
- Data Aggregation
- Scaling Fan-Out
- Data Hotspot
- Social Notifications