← All problems
Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Problem 004 · Messaging and event-driven systems

Design a Notification System

Medium 45 min

Design a service that other teams call to notify users by push, email or SMS. Notifications must not be lost, users can opt out per channel, and third-party providers sometimes slow down or fail.

Functional requirements

  • Accept notification requests from internal services
  • Deliver by push, email or SMS
  • Respect user channel preferences
  • Retry failed deliveries

Non-functional requirements

  • No accepted notification is lost
  • Duplicate sends are minimised
  • A slow provider must not block other channels

Constraints and scale

  • 10 million notifications per day, bursts of 5 000 per second
  • 3 external providers with their own rate limits

You will practise

  • Decouple producers with a queue
  • Design idempotent consumers
  • Isolate failing dependencies
Show 2 hints
  1. Put a buffer between callers and providers
  2. How does a worker know it already sent a message?

Ready to build?

Open the canvas, place your components and explain your decisions. Your draft saves automatically.

Sign in to start

Failure scenarios

  • SMS provider starts timing outThe SMS provider's latency jumps to 30 seconds and half the requests time out.

Run them from the workspace once your design is in place.