Skip to content
SD-24 · System design

Design a Notification Service

Asked at Senior level45 minutes
Our answers stay hidden until you reveal them.

Design the service every other team calls to reach a user: “send Ana her login code”, “tell Ben his order shipped”, “send this offer to 50 million users in Europe”. It delivers by push to phones, email, SMS and an in-app inbox, follows each user’s settings and quiet hours, and tracks whether each message was sent, delivered and opened.

The service sends 2 billion notifications a day for 500 million users and 1.2 billion devices, and a campaign can ask for 50 million sends in a few minutes. The hard parts are keeping a login code fast while a campaign is in flight, staying inside the rate limits of push, email and SMS providers we do not control, never sending the same message twice when everything retries, and never sending a message a user has turned off.

Good questions to ask first

Decide what you would assume for each before you look at ours.

  1. 1Which channels?
  2. 2Who calls us?
  3. 3How fast?
  4. 4Exactly once?
  5. 5Do we honour user settings?
  6. 6Do we write the content?
  7. 7Do we track delivery?
  8. 8Ordering?

How to spend the 45 minutes

  1. 5minPart 1: Requirements and scope
  2. 5minPart 2: Estimates
  3. 5minPart 3: API
  4. 15minPart 4: Architecture, stage by stage
  5. 15minPart 5: Deep dives and trade-offs
Sketch your own design: boxes, arrows and the numbers that matter. Then compare it with ours.Break it in the labVisual walkthrough