Intermediate LevelSystem Design & Architecture
How do you design a scalable Notification System (push, email, SMS)?
β Interview Prompt: Explain designing a Notification System, multi-channel dispatchers (FCM, APNS, Twilio, SendGrid), priority queues, user preferences, and deduplication.
Designing a global multi-channel Notification System (Push, Email, SMS):
Key Components:
1
Notification Router: Validates payloads and checks user preference settings (e.g. Do Not Disturb hours).
2
Priority Queues: Separates high-priority notifications (MFA codes) from low-priority marketing emails in SQS/RabbitMQ.
3
Provider Workers: Interacts with third-party delivery gateways (Apple APNs, Google FCM, Twilio, SendGrid).
4
Deduplication: Uses Redis keys to prevent sending duplicate notifications during worker retries.
Code Implementation Example
markdown
Notification System Architecture:
[API Services] ββ> [Notification Router] ββ> [User Preferences DB]
β
(Enqueue Priority Tasks)
β
βΌ
[SQS High Priority] [SQS Low Priority]
β β
βΌ βΌ
[MFA Workers] [Marketing Workers]
β β
βΌ βΌ
(Twilio / FCM) (SendGrid / APNS)π‘Scalable multi-channel notification architecture.
π― Interview Key Takeaway
Design notification systems using priority queues and user preference filters to handle multi-channel delivery reliably.
#System Design#Notification System#APNS#FCM#Intermediate
Back to all System Design & Architecture Questionsβ