A reliable notification system

Emails are sent inside web requests today. Add push and SMS, user preferences, and no duplicates or lost messages.

To design a notification system, decouple producers with a durable queue, use separate priority lanes so campaigns cannot delay critical messages, and give each notification an idempotency key so retries never send twice. Check preferences at send time, rate-limit towards providers, and move repeated failures to a dead-letter queue.

The system today: An online store sends order emails directly from the request handler that places the order: the handler calls an email provider and waits. When the provider is slow, checkout is slow, and when it fails the email is simply lost.

What has to change: Design a notification system for email, push and SMS that handles 50 million notifications a day, respects each user's preferences and quiet hours, retries on failure without sending duplicates, and does not slow down the services that trigger notifications.

Questions to ask first

Where the interviewer digs in

What a strong answer covers

Common mistakes