CASE STUDY

Push Notification Service

390 words·Advanced

How to use this case study

SDE-2 / Mid

Study the full Push Notification Service case study. Focus on understanding the core components and how they interact. Focus on sections 1-3: requirements, API design, and high-level architecture. Understand the difference between APNs, FCM, and web push protocols.

SDE-3 / Senior

Study the full Push Notification Service case study. Focus on understanding the core components and how they interact. Be ready to discuss the rate limiting strategy per platform, how to handle 10B+ daily notifications, and the priority queue design for critical vs promotional messages.

Staff / Principal

Study the full Push Notification Service case study. Focus on understanding the core components and how they interact. Be prepared to discuss the fan-out architecture for broadcasting to millions of devices, idempotency guarantees, and how to design the analytics pipeline for delivery tracking. Discuss provider failover and retry strategies.

# Push Notification Service \

\

---\

\

0) Problem Restatement\

Design a scalable push notification service that can send notifications to millions of users across multiple platforms (iOS, Android, Web) with high throughput, low latency, and guaranteed delivery. Core challenges include handling massive fan-out (one message to millions of devices), respecting rate limits from platform providers (APNs, FCM), and ensuring reliability despite failures.\

\


1) Requirements\

\

1.1 Functional\

  • Send push notifications to users on iOS, Android, and Web.\
  • Support multiple notification types: transactional (order updates), promotional (offers), social (friend requests).\
  • Target individual users, user segments, or broadcast to all users.\
  • Schedule notifications for future delivery.\
  • Track delivery status (sent, delivered, clicked, failed).\
  • Support rich notifications (images, actions, deep links).\
  • Allow users to manage notification preferences.\
  • Provide analytics (delivery rate, click-through rate).\
\

1.2 Non-Functional\

  • High Throughput: Send millions of notifications per second.\
  • Low Latency: Deliver critical notifications within seconds.\
  • Reliability: Guaranteed delivery with retries and fallbacks.\
  • Scalability: Handle 1 billion+ registered devices.\
  • Rate Limiting: Respect provider limits (APNs, FCM).\
  • Availability: 99.9% uptime.\
  • Deduplication: Prevent duplicate notifications.\
  • Prioritization: Critical alerts delivered before promotional content.\
\

1.3 Scale Estimates\

  • Registered devices: 1 billion devices (500M iOS, 400M Android, 100M Web).\
  • Daily notifications: 10 billion notifications/day.\
  • Peak throughput: 200K notifications/second (major events, flash sales).\
  • Provider rate limits:\
\

- APNs: ~5000 connections, ~500 notifications/sec per connection.\

- FCM: No published limit, but rate limiting exists.\

  • Avg notification size: 1 KB (including payload).\
  • Storage: 10B notifications/day × 1 KB × 30 days retention = 300 TB/month.\
\

1.4 API Design\

The core APIs required for the service:\

  • Send Notification: POST /notify - Send to specific user(s).\
  • Broadcast Notification: POST /broadcast - Send to all users.\
  • Notify Segment: POST /notify-segment - Send to specific segment.\
\

---\

\

2) High-Level Architecture\

\

2.1 Overview\

  • Client AppsAPI GatewayNotification ServiceFan-Out ServiceProvider Workers (APNs, FCM) → Platform ProvidersUser Devices.\
  • Key components: Fan-out for segment/broadcast, rate limiter per provider, retry queue, analytics pipeline.\
\

2.2 Architecture Diagram\

```mermaid\

---\

config:\

layout: elk\

---\

flowchart TB\

%% Sender initiates notification\

Sender[\

More Case Studies

Practice with a Mock Interview

Apply what you learned in a live system design mock interview with our AI interviewer.

Start System Design Interview →