System Design: Multi-Channel Notification Platform
Design a scalable Notification System that supports real-time and scheduled messages across multiple channels (email, push, SMS). Assume this is for a high-traffic consumer platform with millions of users and mission-critical notifications.
Assumptions (you may adjust if you state them explicitly):
-
Traffic: up to 50k notifications/second at peak, 1B/day worst case during major events.
-
Channels: email, mobile push, SMS; multiple third-party providers per channel for redundancy.
-
Scheduling: immediate and future delivery (seconds to 30 days ahead), with cancel/reschedule.
-
Global audience with time zones, quiet hours, user preferences, and regulatory constraints.
Deliverables
-
Components: Enumerate core services and infra.
-
Data flow: Real-time and scheduled paths end-to-end.
-
Storage: Schemas/data models for templates, preferences, schedules, logs, idempotency.
-
Failure handling: Retries, deduplication, provider failover, DLQs, backpressure.
-
Scaling strategy: Partitioning, autoscaling, rate limiting, multi-region.
Also provide:
-
APIs: send now, schedule, cancel, update preferences, provider callbacks.
-
Observability: metrics, tracing, alerting, and SLOs.
-
Capacity planning example.
-
Security and compliance considerations.
Project Architecture Walkthrough (Past Project)
Pick one substantial system you have built or owned. Draw and explain the end-to-end architecture:
-
Services and their responsibilities.
-
Databases/storage choices and schemas.
-
Communication patterns (sync vs async, queues, streams, webhooks), data consistency strategy (e.g., outbox/Saga).
-
Scaling, availability, and failure modes.
-
Tradeoffs and lessons learned.
Be prepared for deep, domain-specific follow-ups (e.g., exact-once semantics, time-zone correctness, multi-tenant throttling, provider outage strategy, replay/backfill, GDPR deletion).