Design a centralized Notification System (Push, Email, SMS).

Code Playground
JavaScript (V8)
Loading...
Console Output
// Output will appear here...
// For React: ReactDOM.createRoot(rootElement).render(<App />);
Recommended Answer

System Design Scenario:

1. Flow: Service triggers event -> Notification Service -> User Preferences -> Provider (APNS/FCM, Twilio, SendGrid).

2. Components:

* Events Queue: Kafka topics for different notification types.

* Notification Workers: Process events, check user settings (do not disturb, preferred channel), construct message.

* Retry Mechanism: Exponential backoff if 3rd party provider fails.

* Rate Limiting: Prevent spamming users.