Notification System

Design a multi-channel notification system that sends email, push, SMS, and in-app notifications on behalf of many internal services, respecting user preferences and delivery guarantees.

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01Who calls this system, and what do they have to know about channels?

Internal services send ONE request ("notify user X about Y"); the system resolves channels, templates, and provider mechanics — callers never talk to APNs or Twilio.

02What control does the recipient have?

Per-category opt-in/out, quiet hours, and a working unsubscribe — checked at send time, not at subscription time, so a change applies immediately.

03Can we answer "did the user ever get it"?

Yes: every notification carries a lifecycle — pending → sent → delivered → opened — queryable per user and per campaign.

04Scheduled and delayed sends - in scope?

Yes: schedule_at parks the notification in a delay store until due - and quiet-hours deferral reuses exactly the same mechanism.

05Ten likes in a minute - ten pushes?

No: digest windows per category collapse N events into one message, and collapsing happens before the queue so the burst never fans out.

06Is the in-app inbox this system too?

Yes, but as the one channel with read-your-write freshness: a synchronous write plus badge push - unlike the fire-and-forget channels.

Out of scopeMarketing campaign authoring and audience segmentation · Message content generation (callers provide the payload/template id) · Real-time chat (that is a different system with different guarantees)

Non-functional requirements

01What delivery guarantee is realistic here?

At-least-once with idempotent dedup: retries are inevitable across third-party providers; a notification_id key keeps the user from seeing duplicates.

02APNs slows to a crawl — what happens to email?

Nothing: each channel has its own queue and workers; one provider’s brownout backs up one queue, never the system.

03Three services notify the same user in the same minute — then what?

A per-user rate limit collapses or defers the excess — the product decision is which notifications win; the mechanism is a shared per-user budget.

04What does a burst look like, and where does it wait?

Millions of requests in minutes land in the channel queues and drain at provider-safe rates — the queue is the shock absorber, not the providers.

05Twilio goes down — who notices?

Not the callers: per-channel multi-provider failover reroutes (primary → backup) on error-rate thresholds, and the lifecycle tracking shows the blip.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • Which channels are day one — push only, or the full set?
  • What is the delivery guarantee callers expect — fire-and-forget or trackable?
  • Are there notification categories that must bypass quiet hours (security alerts)?
  • What burst profile should the queues absorb?
  • Do we need per-provider failover from the start?
01

Unlock the full playbook for Notification System

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series