Social & Feed
Design Twitter / X (Focus on News Feed and Fan-out)
A social feed platform balancing fan-out-on-write (precomputed timelines) against fan-out-on-read (celebrity accounts) to deliver a fast, personalized timeline at scale.
Open and Simulate this Architecture in InfraDraftCore Architectural Components
Tweet Ingestion Service
Accepts and durably persists new posts before any fan-out happens.
Fan-out-on-Write Worker
Pushes a new tweet into every follower's precomputed timeline cache.
Fan-out-on-Read Path
Handles celebrity/high-follower accounts where push fan-out would be too expensive.
Timeline Cache
Redis-backed, per-user precomputed feed for fast reads.
Follower Graph Store
Who-follows-whom, queried on every fan-out and feed assembly.
Ranking/Relevance Service
Orders the timeline by engagement signal rather than pure recency.
Media Storage & CDN
Serves attached images/video without loading the core feed path.
Notification Fan-out Service
Delivers likes/replies/mentions to the right users in near real time.