Design a Notification Service
MediumSystem design · Messaging Infrastructure · Meta · Amazon · SalesForce
Design a notification service used by many products in a company. Product services publish notification requests (a user, a template, parameters, a priority); the service decides whether and how to send, then delivers by push, email, SMS or in-app inbox. Focus on preferences and consent, deduplication and throttling, separating urgent from bulk traffic, provider failures and retries. Out of scope: building the push, email or SMS providers themselves.
Requirements
- Support push, email, SMS and in-app channels with versioned, localised templates
- Respect per-category preferences, quiet hours in the recipient's timezone, and legal opt-outs
- Deduplicate, throttle per user and collapse low-value events into digests
- Handle retries, provider outages and failover, stale tokens, bounces, and idempotent publishing