Notification System Design (Fan-Out & Delivery at Scale)
Scenario
Product teams enqueue notifications; your platform fans out to push, email, and SMS with preferences, templates, retries, and provider rate limits—without becoming a spam cannon or melting APNs/FCM quotas. The interview is queueing, delivery semantics, and ops—not drawing three vendor logos.
Design a notification service that can send notifications to users via multiple channels (push notifications, email, SMS). The system should handle millions of notifications per day with high reliability.
Constraints
Send via push/email/SMS, respect user preferences, templates, scheduled notifications, delivery status, retries, per-channel rate limits
Millions of notifications/day, send quickly (under 1 s for enqueue ack), greater than 99% delivery attempts succeed, scale for peaks, 99.9% uptime
100M notifications/day, peak ~5K/s; push 60%, email 30%, SMS 10%; ~50 GB/day, ~1.5 TB 30-day retention