KatInterview

Design a Multi-Channel Notification Delivery Platform at Scale

System DesignModel answer
MediumModel answerSystem Designdistributed-systemsmessagingqueues

Last updated

Design a globally distributed system that delivers billions of push, email, and SMS notifications daily with low latency, at-least-once guarantees, and no duplicates on retry.

Background

Your company runs a platform used by millions of services — e-commerce checkouts, ride-hailing apps, banking apps — all of which need to reach their end users through push notifications, email, and SMS. You are asked to design the backend infrastructure that powers this.

What You Need to Design

A multi-channel notification platform that can handle peak ingest of 100,000 requests per second, deliver messages to users anywhere in the world with sub-500ms p95 latency for push, and guarantee at-least-once delivery without ever sending a duplicate to the same user from the same originating request.

Functional Requirements

  • Accept notification requests from internal services via a single unified API.
  • Deliver across three channels: mobile push (APNs/FCM), email, and SMS.
  • Continue delivering messages even when a third-party provider (e.g., an SMS gateway or email relay) is temporarily unavailable.
  • Support channel fallback: if push fails, try SMS instead.

Non-Functional Requirements

PropertyTarget
Peak ingest100,000 RPS
Push latency< 500ms p95 end-to-end
Delivery guaranteeAt-least-once
Duplicate protectionIdempotent across retries and region failovers
AvailabilityMulti-region, no single region as SPOF

What Your Answer Should Cover

  1. A high-level architecture with the key components and how they interact.
  2. The API contract for submitting a notification request.
  3. How messages are persisted, queued, and processed in the background.
  4. How idempotency is maintained end-to-end, including the honest limitation.
  5. How the system is deployed across regions and how global traffic is routed.
  6. How failures are handled: retries, circuit breakers, dead-letter queues, and observability.

Hints

Hint 1

Start by separating the ingest path from the delivery path. The API should return immediately (202 Accepted) and hand off work to a durable queue — this is what lets you absorb traffic spikes without dropping messages. Ask yourself: what is the source of truth once the caller gets a 202?

Hint 2

Idempotency has two distinct layers: (1) making sure the same API call from a caller doesn't create two separate jobs, and (2) making sure the same job doesn't call the provider twice even if a worker crashes mid-flight. Think about what data structure and what atomic operation you need for each layer, and be honest about where the remaining gap is.

Hint 3

Think about why push, email, and SMS need separate worker pools rather than one shared pool. A backed-up email queue should never add latency to a push notification. Then consider what the multi-region story looks like for the deduplification store — a per-region store is fast but risks duplicates on failover, while a globally consistent store adds latency. Name the trade-off explicitly.