Design a Notification Service

Normal+ 4
ConsistencyReal-Time TikTok

Design the notification system for a large consumer app. Other services ask it to tell a user something (a new follower, a message, a price drop), and it delivers by push notification, email, or SMS according to the user's preferences.

Functional:

  • Accept notification requests from internal services, for one user or for a large audience.
  • Respect each user's preferences per type and channel, and quiet hours in their timezone.
  • Deliver through push (APNs and FCM), email, and SMS providers.
  • Group bursts ("12 people liked your post") instead of sending 12 notifications.
  • Track delivery and opens.

Non-functional:

  • A single user notification is delivered within 10 seconds at p99.
  • Never send the same notification twice, even when a caller retries.
  • A slow or failing provider does not delay the other channels.
  • A broadcast to 50 million users finishes within 1 hour without hurting single sends.
  • 200 million users, 1 billion notifications a day.
  • Peaks of 50,000 per second, plus a few large broadcasts a day.

Choosing what to notify about, message copy, and provider account setup.

System design
Loading editor...