← Lessons

quiz vs the machine

Gold1400

System Design

Design a Notification System

Send push, email, and SMS reliably across many channels and providers.

6 min read · core · beat Gold to climb

Requirements

  • Deliver notifications over push, email, and SMS from one pipeline.
  • Be reliable, deduplicate, and respect user preferences.
  • Handle provider failures without losing messages.

High level design

Events enter a queue, get enriched with templates and preferences, then dispatch to channel specific workers.

  • Ingestion: producers drop events into a durable queue so spikes are buffered.
  • Processing: a worker resolves the recipient, applies templates, and checks opt out preferences.
  • Channel workers: separate senders call the push, email, and SMS providers with retries.

Bottlenecks

  • Provider outages: wrap each provider with retries and a fallback, and use dead letter queues for repeated failures.
  • Duplicates: an idempotency key per event stops a retried event from notifying twice.
  • Rate limits: providers throttle, so workers respect per provider limits and queue overflow.

Track delivery status so you can report success, retries, and failures, and let users mute channels they do not want.

Key idea

A notification system is a queue fed pipeline that enriches events and dispatches them to per channel workers with retries, dedup, and preference checks.

Check yourself

Answer to earn rating on the learn ladder.

1. What prevents a retried event from sending the same notification twice?

2. Why put a durable queue at ingestion?