Design StreamHub's notification service: when a followed streamer goes live, notify subscribers via push, email, or SMS based on their preferences — 10M events/day, 100M deliveries/day, under 30 seconds latency for push.
Requirements
Functional requirements
- Send push, email, and SMS notifications triggered by platform events.
- User preference filters: opt-in/out per channel and notification type.
- Template rendering with dynamic content (streamer name, stream title).
- Delivery status tracking (sent, delivered, failed, bounced).
- Rate limiting: max N notifications per user per hour.
Non-functional requirements
- Latency: push under 30 s from event; email under 5 min; SMS under 1 min.
- Throughput: 100M deliveries/day ≈ 1.2K deliveries/sec average, ~5K peak.
- Reliability: at-least-once delivery with deduplication.
- Availability: 99.9% — degraded email acceptable; push is priority.
Estimation
- 10M events/day × avg 10 recipients = 100M deliveries/day.
- Push payload ~500 bytes; email ~5 KB with HTML template.
- Storage for delivery logs: 100M × 200 bytes ≈ 20 GB/day — partition by date, TTL 90 days.
Notification platform (AWS)
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 3 sections
- API design
- Architecture
- Scaling fan-out for celebrities
Test yourself
Answer these before moving on — recall is what makes it stick.