Design a global notification service evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Design a globally distributed notification service that sends real-time and scheduled messages (email, SMS, push) to tens of millions of users under regional compliance constraints. Define APIs and data models; describe deduplication, idempotency, and rate limiting; choose storage and queueing layers; outline worker orchestration, retry/backoff, and ordering guarantees; design multi-region failover and disaster recovery; and provide capacity planning with rough estimates and monitoring/alerting.
Quick Answer: Design a global notification service evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
System Design: Globally Distributed Notification Service
Context
You are designing a multi-tenant notification platform that delivers real-time and scheduled messages (email, SMS, push) to tens of millions of users worldwide. The system must comply with regional data residency and privacy regulations, support high availability across multiple regions, and provide strong operational controls (idempotency, deduplication, rate limiting, retries, monitoring).
Assume:
Users and data are partitioned by region (e.g., US, EU, APAC) with strict residency for PII.
The platform offers APIs to trigger individual and bulk notifications and manage templates and user preferences.
Peak traffic can spike rapidly (e.g., incident alerts, promotions).
Requirements
Design a system that addresses the following:
APIs and Data Models
Define REST APIs for:
Sending real-time and scheduled notifications (single and bulk)