Design a Notification System
MediumBuild a system that delivers notifications (email, SMS, push) at scale with reliable retry and deduplication.
Interviewer
Design a Notification System
You're designing a notification system for an e-commerce platform. Users receive notifications for order updates (shipped, delivered), promotional emails, SMS reminders, and push notifications on mobile. The system must be reliable (at-least-once delivery), support multiple channels (email, SMS, push), and throttle notifications to avoid overwhelming users.
Scale assumptions:
- 100 million daily active users (DAU)
- 20% of DAU receive at least one notification per day (20M notifications/day)
- Notification types: email (60%), SMS (20%), push (20%)
- Average latency: <5 seconds for push, <10 seconds for SMS, <1 hour for email
- At-least-once delivery guarantee
- Deduplication window: 1 hour (same event, same user, same channel = 1 delivery)
- Retention: notification delivery logs for 90 days
Derived numbers:
- Total notifications/day: 20M
- Average throughput: 20M ÷ 10^5 sec ≈ 230 writes/sec, ~750 peak
- Storage for logs (90 days): 20M × 365 × 90 × 500 bytes ≈ 328.5 TB (with replication)
- Channels: ~12M emails/day, ~4M SMS/day, ~4M push/day
Sign in to start the interview.
The interviewer grades each stage against a hidden rubric and asks a probing follow-up, mirroring a real system design round. Sessions are capped at 30 turns.