A reliable notification system: a system design interview question
Emails are sent inside web requests today. Add push and SMS, user preferences, and no duplicates or lost messages. It is a mid-level question of about 40 minutes, and it starts from a system that already works, which is how many real design interviews begin.
How do I approach the a reliable notification system question?
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.
Practise this design interview
The situation
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 you are asked to design
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 worth asking first
Which notifications are critical (a password reset) and which can be delayed or dropped (a promotion)?
Can a user opt out per channel or per type, and how fast must that take effect?
Do we need scheduled and bulk sends, such as a campaign to a million users?
What delivery rate do the providers allow, and what do they cost?
Where interviewers dig
A queue between producers and senders, with separate lanes for critical and bulk traffic.
Idempotency keys so retries do not send twice.
Rate limiting towards providers, retries with backoff and a dead-letter queue.
What a strong answer covers
Decouples with a durable queue: services publish an event and return; workers render and send.
Separates priority lanes so a promotion blast cannot delay a password reset.
Uses an idempotency key per notification and per channel to make retries safe, and stores status for support and debugging.
Handles preferences and quiet hours in one place, provider failover, backoff, and a dead-letter queue with alerting.
Traps that cost points
Calling the provider inside the request, or retrying blindly and sending duplicates.
One queue for everything, so a campaign starves critical messages.
Forgetting to check preferences at send time rather than at enqueue time.
How the practice works here
It works on a laptop or desktop, not on a phone: the canvas and the interviewer's view of your drawing need the screen space.
You talk with the interviewer by voice, and the canvas already shows the company's system as it is today. You extend it, and the interviewer sees what you draw. A button pauses your microphone when you want to think or sketch in silence; the interviewer waits.
When the time is up you get a report: a hire or no-hire call for the level, ratings for problem navigation, solution design, technical depth and communication with a quote from your own answer for each, what to fix, and the points a strong answer covered that yours did not. Your first interview on giveinterview, of any kind, is free, and every interview report is free. After that a design interview costs credits at the same per-minute rate as a role interview, and playing duels earns credits you can spend on it.
Frequently asked questions
How long is this design interview?
About 40 minutes, the length of a typical mid-level design round.
Can I do it on my phone?
No. System design practice needs a computer screen for the canvas, so it is for laptops and desktops only.
Do I have to draw?
Yes. The canvas starts with the current system and the interviewer sees what you add, as at a whiteboard. You can pause your microphone to sketch and explain afterwards.
Is it free?
Your first interview on giveinterview, of any kind, is free, and every interview report is free. After that a design interview costs credits at the same per-minute rate as a role interview, and playing duels earns credits you can spend on it.
Keep reading
- Short links with click analytics: a system design interview question
- A rate limiter for a public API: a system design interview question
- A news feed that stays fast at 10 million users: a system design interview question
- Real-time chat with delivery receipts: a system design interview question
- Selling tickets without selling a seat twice: a system design interview question
- Matching riders with nearby drivers: a system design interview question
- A payments ledger you can trust: a system design interview question
- Practice interview online, with an interviewer that answers back
- Company interview guidesRounds and questions by company