4. Design a Notification System
Deliver email, push and SMS with preferences, retries and honest delivery status.
The brief
Design a notification service for transactional and optional messages across email, push and SMS. Follow a request from acceptance to a visible delivery status, respecting user preferences. Explain retries, duplicate provider callbacks and how an urgent message avoids waiting behind a large campaign.
- Accept 10 million notification requests/day, with peaks of 10,000 requests/second.
- Each request can target several channels; providers can throttle, time out or send duplicate callbacks.
- Users can opt out of optional messages, and transactional security alerts have higher priority.
Constraints
- Urgent dispatch delay≤ 30 seconds
- Declare p95 time from durable acceptance to the first provider attempt under normal provider operation.
- Preference enforcement
- Define when preferences are checked and how queued optional messages honor a later opt-out.
- Delivery semantics
- Separate accepted, attempted, provider-acknowledged and delivered states without promising exactly-once delivery.
What to cover
- 01
Request and status contract
Define identity, recipient, channel, template version and observable states.
- 02
Delivery pipeline
Show preference checks, durable queues, provider adapters and priority handling.
- 03
Retry and deduplication
Trace a timed-out send followed by a late callback and a client retry.
- 04
Capacity and operations
Size peak acceptance and worker demand; explain provider quotas, dead letters and sensitive-data retention.
Worked designs
Explore the architecture and decisions, then build on an example with Coach.
Review rubric
AI feedback uses these criteria. Scores are practice feedback.
Message lifecycle
Statuses and duplicate handling reflect external-provider limits.
Recipient controls
Preferences and channel rules hold through queued work.
Delivery capacity
Priorities, provider quotas and backlog recovery are credible.
Recovery and visibility
Retries, failed work and status reconciliation are observable.
Discussion
Share an approach, ask a question, or tag @Coach.
Loading discussion…