Design a Real-Time Notification System with Fan-Out

Last updated: March 3, 2025

Quick Overview

One creator posts and millions of followers get push notifications. Design fan-out strategies, message queuing, device management, and delivery guarantees.

ByteDance
System Design
Software Engineer
ByteDance
March 3, 2025
Software Engineer
System Design Round
System Design
Hard

6

6

3,217 solved


One creator posts and millions of followers get push notifications. Design fan-out strategies, message queuing, device management, and delivery guarantees.

Tests distributed systems fundamentals at TikTok scale where a single creator action triggers millions of downstream events.

What the Interviewer Expects
  • Compare push versus pull versus hybrid fan-out strategies
  • Design message queuing with Kafka for durability
  • Implement device token management for push notifications
  • Address deduplication and rate limiting per user
  • Discuss at-least-once versus exactly-once delivery
Key Topics to Cover
Fan-out patterns
Message queuing
Push notifications
Deduplication
Delivery guarantees
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you handle creators with 100M+ followers?
  • What is your strategy for notification fatigue?
  • How do you ensure notifications arrive within seconds?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Functional Requirements:
    • Users (followers) should receive real-time push notifications when a creator posts new content.
    • The system must support deduplication of notifications to avoid f...
Capacity Estimation
  • Estimating Scale:
    • Assuming TikTok has around 1 billion users, let's estimate 10% are active at any given moment, resulting in 100 million active users.
    • If a creator posts content, let’s ...

Submit Your Answer
Markdown supported

Related Questions