RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #24 // Hard
#24HardReal-Time & Stream Processing
Design a Notification Service at Scale
ASKED IN INTERVIEWS AT:GooglePinterestOCIStubHub
EXECUTIVE SUMMARY & PROBLEM STATEMENT
Design a centralized notification platform dispatching billions of push notifications, SMS, and emails across disparate device providers (APNs, FCM, Twilio, SendGrid).
SCALE ESTIMATION & TRAFFIC ENVELOPE
DAILY ACTIVE USERS / TPS1 Billion notifications delivered daily
READ / WRITE TRAFFIC RATIOHeavy write pipeline
5-YEAR STORAGE CAPACITYAudit logs stored in cold object storage
FUNCTIONAL REQUIREMENTS
- [1]Send Push, SMS, and Email notifications
- [2]User notification preferences and quiet hours
- [3]Template rendering and localization
NON-FUNCTIONAL REQUIREMENTS
- •High throughput: 100K notifications/sec
- •Delivery latency < 2 seconds for high priority
- •Idempotent delivery (zero duplicates)
CORE ARCHITECTURAL COMPONENTS
Notification Ingestion API
Channel Priority Queues
User Preference Cache
Vendor Dispatcher Workers
Retry & Dead-Letter Service
DATA SCHEMA & PERSISTENCE
NotificationRequest: id, user_id, channel, priority, template_id, params, status
DISTRIBUTED TRADE-OFFS & FAILURE MODES
- ⟡Decoupling message queue by channel prevents slow third-party SMS gateways from backing up urgent mobile push alerts.