System design interview questionHard
Amazon

Design Twitter Feed

Design a scalable news feed system where users can post tweets and follow other users.

1. Problem Statement

Let's design Twitter's home timeline service. What are the key product flows and constraints we should agree on first?

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph LR
    A["Design Twitter Feed"]
    A --> F1["Fan-out Strategies Push vs Pull vs Hybrid Model"]
    A --> F2["Timeline Generation Precomputed Feeds in an In-Memory Store"]
    A --> F3["Media Path Separation from Publishing"]
    A --> F4["Pagination Strategies Cursor-based vs Offset-based"]
    A --> F5["Audience and age-restriction enforcement"]

3. Key Focus Areas

  • 1
    Fan-out Strategies (Push vs Pull vs Hybrid Model)
  • 2
    Timeline Generation (Precomputed Feeds in an In-Memory Store)
  • 3
    Media Path Separation from Publishing
  • 4
    Pagination Strategies (Cursor-based vs Offset-based)
  • 5
    Audience and age-restriction enforcement

4. What the Interviewer Looks For

The interviewer probes these areas, and the report grades the interview against them.

  • Requirements and capacity
  • Fan-out strategy and celebrity handling
  • Timeline storage, read path, and pagination
  • Write path and data model
  • Visibility, consistency, and resilience

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Continue to Dashboard

Core Concepts

System DesignDistributed SystemsCaching

Continue preparing

Build a complete software engineer mock interview plan

Prepare by company

Related System Design

Design a Notification System

Design a scalable notification service that sends emails, SMS, and push notifications to millions of users.

Related System Design

Design Job Scheduler

Design a distributed job scheduler capable of handling recurring and one-time tasks at scale.