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.
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
- Clients should be able to send notifications through an API.
- The system should support multiple notification channels:
- SMS
- Push
- Users should be able to configure notification preferences.
- The system should support notification templates.
- Notifications should be retried if delivery fails.
- The system should track delivery status.
- The system should support scheduled notifications.
- 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
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.
- API Gateway / Load Balancer
- Notification API Service
- Template Service
- Preference Service
- Notification Orchestrator
- Message Queue
- Channel Workers
- Provider Adapters
- Notification Database
- Analytics / Logging / Monitoring
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]
This project is licensed under the MIT License. See LICENSE for details.