Skip to content
System Designer

System design interview preparation

Design a notification system

Design a notification system with queues, provider limits and safe retries. Understand acceptance and expiry, then play the notification problem.

Play the matching problem

Say what delivered means

A notification service accepts work from other teams and sends it through push, email or text providers. Acceptance by your API, acceptance by the provider and arrival on a phone are different events. This game scenario measures provider acceptance and has a separate deadline for waiting work. State that boundary before choosing a queue. Otherwise a fast acknowledgement can hide messages that are still waiting long after they are useful.

Separate acceptance from sending

Persist accepted work and let workers send it within the provider’s limits. The queue absorbs a short mismatch between arriving work and sending capacity. It does not create capacity at the provider. Estimate the arrival rate, available sending rate and time needed to drain a backlog. Watch the age of the oldest work as well as the number of messages. Expiring an old login alert may be better than sending it hours late.

Handle an unknown result

A worker can time out after the provider accepted a message. Retrying blindly may send it twice. Never retrying may lose a message the provider did not accept. A stable identity and a provider that honors it give you a way to resolve that uncertainty. Without that support, explain the remaining duplicate or loss trade-off. A transaction in your own database cannot by itself make an outside provider call atomic.

Test the slow boundary

Build a baseline using the actual mix and deadlines below. Before running, predict what happens when a provider becomes slow or lowers its quota. Run the whole day and compare accepted work, failed requests, waiting age and cost. Change a worker or queue policy, then repeat the same workload. In your explanation, connect each improvement to the boundary it affects. More workers cannot drain work faster than an unchanged downstream quota permits.

The matching game brief

Every other team asks you to send messages: order shipped, new login, a sale starting. You send them by push, email and text through outside providers who have their own limits. Send each message once, and never block the team that asked.

Who uses it
30 million people a month
Audience in plain numbers
30,000,000 people per month
Normal peak
≈ 8,000 requests per second
Request mix
Notification: 70%; Analytics event: 20%; Write: 10%
Speed for 99 of 100 requests
Write: ≈ 300 ms
Successful requests
99.9%
Data safety
No acknowledged write may be lost.
Monthly budget
≈ $120,000
Data at rest
≈ 2 TB
Where users are
North America: 60%; Europe: 40%
Home region
North America
Waiting deadlines
Notification: 1,800 seconds; Analytics event: 1,800 seconds; Write: 1,800 seconds
Required proofs
Consent records

≈ marks an approximation, just as in the game. Waiting deadlines measure the age of queued work and are separate from interactive response time.

  • Providers cap how fast you may send: push ≈ 10,000/s, email ≈ 1,000/s, text ≈ 100/s (approx.).
  • Texts cost far more than email or push.
  • Notification speed measures provider acceptance. Device receipt is outside this traffic model; check expiry, provider outcome and retries in the correctness trace before claiming delivery guarantees.

Play the notification service problem or read the full problem and clarification answers.

Playing on systemdesigner.io needs a free Google or GitHub account. These pages, the lessons and the guides can be read without one. Figures in the game are teaching approximations.

Study the decisions

Read the full walkthrough for estimates, alternatives and failure cases.

More interview practice