Design a notification system
Your app's services want to tell people things: "your order has shipped", "Ana liked your photo", a code to sign in, a sale this weekend. The notification system takes those requests and delivers each one by push, email, SMS or an inbox in the app, the way each user has chosen. It's a post room for a big company: every department drops off its letters, and the post room knows each person's address, which post they've refused and when not to knock.
It's also asked as "design a push notification service". Interviewers like it because it joins at-least-once queues to outside providers that can't take a message back. It also has a burst you cause yourself at 9:00, and user preferences that must hold on every path. Scheduling work for later teaches the timed half, and the closest case study is the job scheduler.
Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.
Step 1 · Clarify the features and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a notification system for our app.
You: A few questions first. Who sends notifications, and what kinds?
Interviewer: Our own services: order updates, someone liking your photo, sign-in codes, and marketing campaigns.
You: Which channels: push, email, SMS, an inbox in the app?
Interviewer: All four. SMS only for sign-in codes. The inbox keeps 30 days.
You: What can users control?
Interviewer: They can turn each kind off per channel and set quiet hours at night. At most two marketing messages a day.
You: Are campaigns sent at a set local time? And do teams need to know what was delivered and opened?
Interviewer: 9:00 in each user's time zone. Yes, per notification, but a dashboard a minute behind is fine.
You: Then I'll cover sends from services and campaigns, four channels, preferences, quiet hours and caps, the inbox, and delivery state. Out: the template editor, choosing a campaign's audience (another team hands us the list), A/B tests, and live updates to an open app, which Real-time delivery covers. OK?
Interviewer: Good.
Each answer shapes the design: sign-in codes beside campaigns need separate lanes, preferences must be checked at send time, local send times need scheduled chunks, and delivery state needs one row per notification.