InterviewHubPRO
Section Overview
Q22

Question 22 of 50

Part 2: Real-World High-Scale Architecture Problems (11 - 25)

44%
System Design (50 Qs)•Part 2: Real-World High-Scale Architecture Problems (11 - 25)

Design a Distributed Notification Service (APNs, FCM, SMS, and Email).

In Simple Words: Send billions of push notifications, SMS texts, and transactional emails with high delivery rates, user notification preferences, and deduplication.

Architectural Highlights:

  • Notification Template Engine: Renders dynamic strings and localized language templates.
  • User Preference Filter: Checks opt-outs, quiet hours, and channel frequency capping.
  • Priority Queues: Urgent verification OTP SMS bypasses marketing email queues.
Architecture Flowchart
flowchart LR
    Services["Triggering Microservices"] --> API["Notification Gateway"]
    API --> Prefs["User Opt-Out & Quiet Hours Filter"]
    Prefs --> PriorityRouter{"Priority Router"}
    PriorityRouter -->|"High Priority (OTP)"| UrgentQueue["Kafka High-Priority Topic"]
    PriorityRouter -->|"Low Priority (News)"| BulkQueue["Kafka Bulk Topic"]
    UrgentQueue --> Workers["Delivery Workers"]
    Workers --> APNs["Apple APNs"]
    Workers --> FCM["Google FCM"]
    Workers --> Twilio["Twilio SMS"]