Notification preferences fan-out

DesignHard45 min

Your task

Design a notification preferences + fan-out service for a collaboration app with ~3M users. Events (mentions, comments, assignments) trigger notifications across channels (in-app, email, push, Slack). Users set fine-grained preferences (per-channel, per-event-type, quiet hours, digest vs immediate, mute specific threads). A single event can fan out to many recipients (e.g. a comment on a doc watched by 500 people). Requirements: respect preferences exactly, dedupe duplicate triggers, batch 'digest' notifications, and deliver immediates within seconds.

It covers

  • Notifications
  • Fan out
  • Preferences
  • Deduplication