Design a Notification System
Design a system that sends notifications to users by push, email and SMS on behalf of other services.
Push, email and SMS · Medium
Functional requirements
- Other services trigger notifications through an API
- Deliver by push, email or SMS
- Respect user preferences and quiet hours
- Retry failed deliveries
Scale & non-functional requirements
- 10M notifications per day with spikes
- Never send the same notification twice
- A slow provider must not block others
Hints
- Where does a queue decouple producers from senders?
- How do you make retries safe (idempotency)?
- One queue or one per channel?