Design Home Timeline Delivery For Accounts With Huge Followings
Last updated: November 29, 2026
Quick Overview
Design the system that serves the Following home timeline on X, where most accounts have a few hundred followers but some have over 100 million, reads outnumber writes by orders of magnitude, and a new post should appear for followers within seconds.
X
November 29, 20260
0
0 solved
Design the system that serves the Following home timeline on X, where most accounts have a few hundred followers but some have over 100 million, reads outnumber writes by orders of magnitude, and a new post should appear for followers within seconds.
Timeline delivery is the core scaling problem behind X and the reason it moved to precomputed timelines in in-memory caches with special handling for celebrity accounts. Interviewers look for a quantified read and write path, a hybrid fanout decision with a clear threshold, and honest failure handling.
What the Interviewer Expects
- Estimates read and write QPS and fanout volume
- Explains fanout on write versus on read and picks a hybrid
- Defines the timeline cache data model and its size bound
- Handles deletes, blocks and unfollows
- Covers cold users and cache rebuild
- Discusses hot keys and multi-region
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- Where exactly do you put the celebrity threshold, and is it static?
- A user with 100M followers deletes a post one second after posting. What happens?
- How do you rebuild the timeline cache after losing a whole cache cluster?
- How does the For You timeline change this design?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: post, follow and unfollow, read Following timeline newest first with pagination, delete. Non-functional: p99 read under 200 ms, a new post visible to most followers within about 5 seconds,...
High-Level Design
Write path: Post service stores the post (keyed by Snowflake ID) and emits an event to Kafka. Fanout workers read the author's follower list from the graph service and push the post id into each follo...