KatInterview

Design a Multi-Channel Notification Delivery Service

System DesignModel answer
MediumModel answerSystem Designsystem designnotificationsmessaging

Last updated

Design a scalable backend service that reliably delivers notifications across email, SMS, and push channels with rate limiting and user preferences.

Scenario

You are a backend engineer at a mid-sized e-commerce platform. The product team wants to consolidate all outgoing notifications — order confirmations, shipping updates, promotional campaigns, and security alerts — into a single Notification Delivery Service owned by one team.

Currently, five different microservices each call third-party providers (email, SMS, push) directly, leading to duplicate sends, no user preference enforcement, and no visibility into delivery failures.

What You Are Asked to Design

Design the Notification Delivery Service that acts as the single entry point for all outgoing notifications.

Address the following in your design:

Functional Requirements

  • Accepts notification requests from internal services (producers)
  • Supports three channels: email, SMS, and in-app push
  • Respects per-user channel preferences and opt-outs
  • Deduplicates notifications within a configurable time window
  • Tracks delivery status (sent, delivered, failed, bounced)

Non-Functional Requirements

  • Scale: ~5 million registered users; peak load of 20,000 notification requests/minute during flash sales
  • Latency: Security/transactional alerts must be delivered within 5 seconds of the triggering event
  • Reliability: At-least-once delivery; failed sends must be retried with backoff
  • Rate limiting: No user receives more than 3 promotional notifications per day per channel

Expected Coverage

  1. API design — what does a producer call, and what does the contract look like?
  2. Data model — key tables/documents and their purpose
  3. High-level architecture — major components and data flow
  4. Deep dives — deduplication, priority handling, retry logic, rate limiting
  5. Trade-offs — at least two meaningful decisions with pros/cons

You do not need to design the third-party provider integrations in detail. Focus on the core service.

Hints

Hint 1

Think about how you separate the act of receiving a notification request from actually dispatching it — what does that boundary buy you in terms of reliability and scalability?

Hint 2

User preferences and rate limits are read on every notification; how do you make those lookups fast without hitting a relational database on every request?

Hint 3

Transactional (security) and promotional notifications have very different latency and volume profiles — should they share the same processing path?