33. Design a Notification System
1
The interview prompt2
33.1 What do you ask first?3
33.2 How big is this, really?4
33.3 What are the doors?5
33.4 What do we store?6
33.5 What does the whole system look like?7
33.6 Why one queue per channel?8
33.7 How do retries and de-duplication work?9
33.8 How do user preferences work?10
33.9 What makes OTPs special?11
33.10 What would you say in the last five minutes?12
Score yourself13
Variations to practise14
Sources15
Code lab33. Design a Notification System
Sources
3 min read+10 XP
Source notes
- Gmail and Yahoo bulk sender requirements (from February 2024: SPF, DKIM and DMARC authentication; one-click unsubscribe processed within two days; spam complaint rate below 0.3%; Google defines a bulk sender as more than 5,000 messages a day to Gmail addresses): Google and Yahoo sender guidelines, as summarised by email providers; checked 2026-10-08.
- SMS/PSTN one-time passcodes classified as a "restricted" authenticator: NIST SP 800-63B (Digital Identity Guidelines), checked 2026-10-08.
- APNs and FCM payload limits and delivery behaviour: see Chapter 21's source notes.
- All traffic numbers, peak factors and provider rates are interview assumptions agreed in Step 1, not figures for any real service. Arithmetic computed 2026-10-08.
- Queue isolation, failover with de-duplication, preference decisions and OTP rules: tested 2026-10-08 (
code/ch33_notifications.py, all checks pass).