A notification system alerts users when an event elsewhere in the product may deserve their attention. For example, a social application might notify a user that "someone you follow published a new post." Although the user sees only a compact push banner, the underlying system must handle fanout, manage traffic bursts, and recognize that asynchronous push providers are external side effects rather than the authoritative record.
<img src="https://cgppcnnkwbfiieexbrea.supabase.co/storage/v1/object/public/question-images/sources/5d7ea23430384348adc0.png" alt="" width="450" preview/>High-level architecture and data flow of the notification system
Publishing a post should remain inexpensive, while the notification system asynchronously converts that action into large-scale, attention-conscious push delivery without overwhelming recipients or relying on providers as the system of record.
99.99% durability when creating notification intent and 99.9% successful handoff to providers inside a healthy region.p95 < 100 ms, with ordinary pushes arriving within several seconds outside burst conditions.10M post events each day, 100B+ follow relationships, peak publishing volume of roughly 5k/s, and celebrity accounts with 50M+ followers.| Quantity | Assumed value | Used for |
|---|---|---|
| Daily post volume | 10M | Establishing baseline upstream event load |
| Peak publishing throughput | 5k/s | Sizing burst ingestion and fanout-job creation |
| Follow relationships | 100B+ | Shaping follower queries and projections |
| Followers of a celebrity account | 50M+ | Choosing the threshold strategy for hot-author fanout |
| Typical active devices per user | 2-3 | Estimating provider-send multiplication |
| Typical notifications per user each day | 10-30 | Informing batching and preference assumptions |
| Burst volume for one recipient | 10+ in 60s | Selecting a coalescing window |
| Provider handoff time | 100 ms to 2 s | Sizing worker parallelism and retries |
At these scales, the architecture should acknowledge publishing quickly, perform fanout asynchronously, aggregate by recipient, and allow provider-facing workers to scale separately.
A practical interview target is a straightforward user-visible limit: during bursts, keep this event category to about 1-2 pushes per recipient per minute, even when the underlying unread count grows more quickly.
[!NOTE] Use these estimates to establish orders of magnitude during the interview; they are not a final capacity-planning approval.
Out of scope (below the line)