RELIABILITY, SECURITY & CASE STUDIES · SUBTOPIC
Case Study: Notification Platform (Push / Email / SMS)
Priority queues, user preferences, rate limits, template rendering, and third-party vendor failover.
IntermediatePart of System Design Case Studies
Subtopics in System Design Case Studies (8)
In plain words
When an order ships or a login OTP triggers, the app drops a single event on a queue. Workers check user settings ("SMS off, Push on"), apply templates, and send via APNs/FCM/Twilio - keeping OTPs in a fast VIP lane separate from bulk marketing blasts.
Think of it like…
Hospital triage: emergency OTP messages jump straight to the express lane while weekly newsletters wait behind them.
Loading interactive diagram
Loading interactive exercise
Theory & how it works
Preventing duplicate alerts & vendor lock-in
Store a short notification_id dedup key in Redis so queue retries never send 3 duplicate OTP SMS messages. Wrap providers behind a vendor adapter so if Twilio degrades in one country, traffic fails over automatically to an alternate SMS provider.
Key points & practical guide
Summary checklist
- Separate high-priority OTP/security queues from bulk marketing queues
- Check user opt-out preferences + per-user notification caps before sending
- Deduplicate by
event_idand log delivery receipts for debugging
When to use it
- Any product sending push, email, SMS, or webhook alerts at scale
Watch out for
- Putting 5M promotional emails into the exact same queue as 2FA login codes
Quick check
Loading quiz