Skip to content

Rumman90/system-design-notification-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Design: Notification Service

A scalable notification service that can send notifications through multiple channels such as Email, SMS, and Push.
The system is designed to handle high throughput, retries, provider failures, user preferences, and delivery tracking.

Goal

Build a notification platform that allows applications to send notifications reliably to users through different channels while supporting:

  • Email notifications
  • SMS notifications
  • Push notifications
  • User notification preferences
  • Delivery tracking
  • Retry mechanisms
  • Provider failover
  • Template management

Functional Requirements

  1. Clients should be able to send notifications through an API.
  2. The system should support multiple notification channels:
    • Email
    • SMS
    • Push
  3. Users should be able to configure notification preferences.
  4. The system should support notification templates.
  5. Notifications should be retried if delivery fails.
  6. The system should track delivery status.
  7. The system should support scheduled notifications.

Non-Functional Requirements

  • High availability
  • Scalability
  • Low latency for request acceptance
  • Reliable delivery
  • Fault tolerance
  • Extensible for new channels/providers
  • Observability and monitoring
  • Idempotency to avoid duplicate sends

High-Level Design

The notification service accepts notification requests through an API, validates them, stores metadata, and pushes delivery jobs into a message queue. Workers consume these jobs and route them to the appropriate provider (Email, SMS, Push). Delivery results are persisted, and failed jobs are retried using retry queues or delayed jobs.


Core Components

  • API Gateway / Load Balancer
  • Notification API Service
  • Template Service
  • Preference Service
  • Notification Orchestrator
  • Message Queue
  • Channel Workers
  • Provider Adapters
  • Notification Database
  • Analytics / Logging / Monitoring

Architecture Diagram

flowchart TD
    A[Client Applications] --> B[API Gateway]
    B --> C[Notification API Service]

    C --> D[Template Service]
    C --> E[Preference Service]
    C --> F[(Notification DB)]
    C --> G[Message Queue]

    G --> H[Email Worker]
    G --> I[SMS Worker]
    G --> J[Push Worker]

    H --> K[Email Provider Adapter]
    I --> L[SMS Provider Adapter]
    J --> M[Push Provider Adapter]

    K --> N[Email Provider]
    L --> O[SMS Provider]
    M --> P[Push Provider]

    H --> F
    I --> F
    J --> F

    H --> Q[Retry Queue]
    I --> Q
    J --> Q

    Q --> H
    Q --> I
    Q --> J

    F --> R[Monitoring / Analytics Dashboard]
Loading

License

This project is licensed under the MIT License. See LICENSE for details.

About

Designed a scalable Notification Service supporting Email, SMS, and Push with queues, retries, provider failover, user preferences, and delivery tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors