The System Design Interview: A Step-by-Step Framework
A step-by-step framework for system design interviews: clarifying requirements, estimates, APIs, data models, high-level design, deep dives and trade-offs.
How to design a notification system for push, email and SMS at scale: requirements, architecture, queues, templates, preferences, retries and deduplication.

Almost every product sends notifications: order updates, password resets, reminders, marketing, and messages from a chat system to users who are offline. A notification system looks simple until it has to send millions of messages across several channels without losing, duplicating or spamming any of them.
Functional: send push, email and SMS; templates with variables; user preferences and opt-outs; scheduled sends; delivery tracking.
Non-functional: reliable (no lost critical messages), scalable to bursts, low latency for time-sensitive messages such as login codes, and no duplicates.
Separate queues for transactional (password resets, security alerts) and bulk (newsletters, promotions) traffic, so a marketing blast never delays a login code.
Providers limit throughput, and users shouldn’t be flooded. Apply rate limiting per provider, per user and per notification type, for example no more than a few marketing pushes per day.
Store per-user, per-channel, per-category settings, plus time zone and quiet hours. Check them before rendering, and honour unsubscribes immediately; email and SMS rules in many countries require it.
Workers are stateless and scale horizontally with queue depth. Cache templates and preferences (see caching strategies), and shard the status store by user or notification ID as it grows.
Track send rate, provider errors, delivery and open rates, queue lag and end-to-end latency for critical messages, with alerts when they drift.
Assign each notification a unique ID, record processed IDs and make workers idempotent.
No. Accept the request quickly, queue it and send asynchronously.
Store each user’s time zone and schedule sends in local time, respecting quiet hours.
Every article is edited by a human and checked against our editorial policy. Spotted a mistake? Tell us.
A step-by-step framework for system design interviews: clarifying requirements, estimates, APIs, data models, high-level design, deep dives and trade-offs.
A URL shortener system design: requirements, capacity estimates, API, short-code generation, database choice, caching, analytics and scaling trade-offs.
Microservices or a monolith? The real costs and benefits of each, the modular monolith middle ground, and a practical framework for deciding and migrating.