COMPANY_GUIDE

Twitter/X System Design Interview: Complete Preparation Guide

Nail your Twitter/X system design interview. Covers the interview format, common systems, evaluation criteria, and a 4-week preparation roadmap.

22 minUpdated Apr 25, 2026
twitter-xsystem-designinterviewpreparation

Interview format

5 rounds total.

System Design45 min

Design a real-time content distribution or social media system. Twitter/X values understanding of fan-out architectures, timeline construction, and real-time search.

Coding 145 min

Algorithm and data structure problem, medium to hard difficulty. Clean and efficient code is expected.

Coding 245 min

Second coding round, often with a system-level or distributed computing flavor.

Behavioral45 min

Assesses ability to work in a fast-changing environment, handle ambiguity, and drive results with limited resources.

Commonly asked systems

Design Twitter's home timeline (fan-out problem)Design a tweet publishing and delivery systemDesign Twitter's trending topics algorithmDesign a real-time search system for tweetsDesign a URL shortening service (t.co)Design a notification system for mentions, likes, and retweetsDesign Twitter Spaces (live audio rooms)

What they evaluate

Fan-Out ArchitectureHigh

Can you explain fan-out-on-write vs fan-out-on-read and design a hybrid approach for timeline construction?

Real-Time Content DeliveryHigh

Tweets must appear in followers' timelines within seconds. Can you design for this latency requirement at global scale?

Scalability Under Viral LoadHigh

A single celebrity tweet can generate millions of fan-out operations. How does your design handle extreme hotspots?

Search & TrendingMedium-High

Can you design real-time search indexing and trend detection that keeps up with the firehose of tweets?

Trade-off ArticulationMedium

Twitter's architecture involves many classic trade-offs. Can you discuss them thoughtfully and make informed decisions?

Tips

  • Master the fan-out problem — understand when to use fan-out-on-write (most users) vs fan-out-on-read (celebrities with millions of followers)
  • Study Twitter's Snowflake ID generation — it's a classic distributed systems pattern for generating unique, time-sorted IDs
  • Know how real-time search indexing works — tweets need to be searchable within seconds of posting
  • Understand trending topic detection: sliding window counting, anomaly detection, and geographic filtering
  • Be prepared to discuss the challenges of content moderation and policy enforcement on a real-time platform
  • Study caching strategies extensively — Twitter uses massive Redis and Memcached clusters for timeline serving
  • Discuss the trade-offs of a monolithic timeline cache vs distributed timeline construction
  • Prepare for questions about Spaces or live audio — real-time audio distribution is increasingly relevant

Preparation roadmap

Week 1-2Foundations & Timeline Architecture
  • ·Review distributed systems fundamentals: consistent hashing, replication, message queues
  • ·Study fan-out architectures in depth: fan-out-on-write, fan-out-on-read, hybrid approaches
  • ·Learn about Snowflake ID generation and time-sorted unique identifiers
  • ·Read Twitter's engineering blog and classic papers about their architecture
Week 3-4Core System Designs
  • ·Design a home timeline system with hybrid fan-out
  • ·Design a tweet publishing pipeline with write path and delivery guarantees
  • ·Design a URL shortening service with analytics (t.co)
  • ·Practice estimation: tweets per second, timeline reads, cache hit ratios at Twitter scale
Week 5-6Advanced Systems
  • ·Design a real-time search system that indexes tweets within seconds
  • ·Design a trending topics detection system with geographic awareness
  • ·Design a notification system for high-volume events (celebrity tweets, breaking news)
  • ·Deep dive into caching: Redis cluster design, cache invalidation, and hot-key handling
Week 7-8Mock Interviews & Refinement
  • ·Complete at least 4 mock system design interviews focusing on fan-out and real-time delivery
  • ·Practice explaining the celebrity fan-out problem and hybrid solutions clearly
  • ·Review classic Twitter engineering talks and architecture papers
  • ·Prepare behavioral stories about working with ambiguity and shipping under pressure
PRO

Unlock with Pro

Unlock the full content and everything at this level.

Get Pro — $9/moAlready a member? Log in

GO DEEPER

Master this topic in our 12-week cohort

Our Advanced System Design cohort covers this and 11 other deep-dive topics with live sessions, assignments, and expert feedback.

FREE_COURSES
preview