Design: Real-time Notification System
Design covers backend architecture, message delivery, subscription management, and client communication. Out of scope are UI design and third-party integrations.
Functional Requirements
FR1: Deliver notifications to users instantly when events occur
FR2: Support 100,000 concurrent users receiving notifications
FR3: Allow users to subscribe/unsubscribe to different notification types
FR4: Ensure message delivery order is preserved per user
FR5: Provide at-least-once delivery guarantee
FR6: Support web and mobile clients
Non-Functional Requirements
NFR1: Latency for delivering notifications should be under 200ms (p99)
NFR2: System availability should be 99.9% uptime
NFR3: Handle peak loads of 10,000 notifications per second
NFR4: Support horizontal scaling for growing user base
