Codetail

All challenges
🔔

Design a Notification System

Hard

Push, email, SMS, and in-app at 100M+ notifications per day.

~50 min

The Brief

Design a system that reliably delivers notifications to users across push (FCM/APNs), email, SMS, and in-app channels. Users have preferences. Notifications must not duplicate. The system must handle massive fan-out (a single event can trigger millions of notifications) and gracefully retry failures.

Scale

Active users10M
Notifications / day100M+
Delivery SLA<1s (push/in-app)
Uptime99.9%
Fan-outUp to 5M recipients per event

Requirements

  • Send push (FCM/APNs), email, SMS, and in-app notifications
  • Users can set channel preferences per notification type
  • Deduplicate: same notification never delivered twice
  • Retry failed deliveries with exponential backoff
  • Rate-limit per user (max N notifications per channel per hour)
  • Support scheduled and triggered notifications

Constraints

  • Third-party rate limits: FCM, Twilio, SendGrid all have caps
  • No message loss — durability is required
  • System must survive a single region going down
  • Preference lookups must not become a bottleneck at fan-out

0 of 5 sections filled

1. High-Level Architecture

Draw out the main components and how they connect.

2. Data Model & Storage

What are the key entities? What databases do you use and why?

3. API Design

Key endpoints — what do callers send and what do you return?

4. Scaling & Queue Strategy

How do you handle a 5M-recipient fan-out without melting?

5. Trade-offs & Decisions

What did you choose, what did you sacrifice, and why?

AI review is a Pro feature

Fill in your design free. Upgrade to get feedback on your trade-offs.

Upgrade