← Lessons

quiz vs the machine

Gold1410

System Design

The Notification System Design Recap

Delivering messages across push, sms, and email through one queued pipeline.

5 min read · core · beat Gold to climb

One pipeline, many channels

A notification system delivers messages to users across channels, mobile push, sms, email, and in app alerts. The goal is one pipeline that accepts a notification request and reliably routes it to the right channel and provider.

The flow

  • A service requests a notification with a recipient, a channel, and content.
  • The request lands in a queue so spikes do not overwhelm downstream providers.
  • Workers pull from the queue, build the message, and call the channel provider.
  • A provider, like a push gateway or an email service, delivers to the device or inbox.

Reliability

  • Failed sends are retried with backoff, since providers can be flaky.
  • Idempotency keys prevent sending the same notification twice on retry.
  • Delivery status is tracked so the system knows what reached the user.

User controls

  • Preferences let users opt out of channels or categories.
  • Rate limits and batching prevent notification spam.
  • A template system keeps content consistent and localizable.

Key idea

A notification system queues requests then routes them through workers to push, sms, or email providers, with retries, idempotency, user preferences, and templates for reliable multi channel delivery.

Check yourself

Answer to earn rating on the learn ladder.

1. Why put a queue between the request and the providers?

2. What prevents a retry from sending a duplicate notification?

3. What do user preferences control?