Design a Notification System
Create a multi-channel notification system that can send messages via email, SMS, push notifications, and in-app alerts.
Functional Requirements
- Send notifications across multiple channels (email, SMS, push, in-app)
- Support templated messages with personalization
- Allow user preferences for notification channels and frequency
- Batch and digest notifications to prevent spam
- Track delivery status and engagement metrics
Non-Functional Requirements
- Handle 1M+ notifications per day
- Delivery within seconds for urgent notifications
- At-least-once delivery guarantee
- Support for scheduled and recurring notifications
Questions to Consider
- How will you handle channel-specific formatting and rate limits?
- What queue architecture will ensure reliable delivery?
- How will you deduplicate notifications?