Bird
Raised Fist0
HLDsystem_design~12 mins

Design a notification system in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Design a notification system

This notification system sends messages to users via multiple channels like email, SMS, and push notifications. It must handle high volumes of notifications reliably and deliver them quickly.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  v
Notification Service
  |          |           |
  v          v           v
Message Queue  Cache   Database
  |          |           |
  v          v           v
Email Service  SMS Service  Push Notification Service
  |
  v
User Devices
Components
User
client
Initiates notification requests
Load Balancer
load_balancer
Distributes incoming requests evenly to API Gateway instances
API Gateway
api_gateway
Handles client requests, routes them to Notification Service
Notification Service
service
Processes notification requests and pushes messages to queue
Message Queue
queue
Buffers notification messages for asynchronous processing
Cache
cache
Stores recent notification statuses for quick access
Database
database
Stores user preferences and notification history
Email Service
service
Sends email notifications to users
SMS Service
service
Sends SMS notifications to users
Push Notification Service
service
Sends push notifications to user devices
User Devices
client
Receives push notifications
Request Flow - 10 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayNotification Service
Notification ServiceDatabase
Notification ServiceMessage Queue
Message QueueEmail Service
Message QueueSMS Service
Message QueuePush Notification Service
Push Notification ServiceUser Devices
Notification ServiceCache
Failure Scenario
Component Fails:Message Queue
Impact:Notifications cannot be queued for delivery, causing delays or loss of messages
Mitigation:Use replicated queues and fallback retry mechanisms; alert system operators
Architecture Quiz - 3 Questions
Test your understanding
Which component handles distributing incoming user requests evenly?
ANotification Service
BAPI Gateway
CLoad Balancer
DMessage Queue
Design Principle
This design uses asynchronous message queues to decouple notification processing from delivery, improving scalability and reliability. Caching recent statuses reduces database load. Load balancers and API gateways ensure even traffic distribution and secure routing.