Design: Notification System
Design covers backend notification processing, delivery, and subscription management. Out of scope: UI design for user preferences and third-party integrations beyond email, SMS, and push.
Functional Requirements
FR1: Send notifications to users via multiple channels: email, SMS, and push notifications
FR2: Support scheduling notifications for future delivery
FR3: Allow users to subscribe or unsubscribe from different notification types
FR4: Ensure delivery guarantees with retries on failure
FR5: Provide an API for other services to trigger notifications
FR6: Support at least 10,000 notifications per second
FR7: Ensure p99 latency for notification delivery under 500ms
FR8: Maintain 99.9% system availability
Non-Functional Requirements
NFR1: Handle spikes up to 50,000 notifications per second during peak times
NFR2: Notifications must be delivered in order per user
NFR3: Data privacy compliance for user contact information
NFR4: System must be horizontally scalable
