CoursesSystem Design Case Studies
The Social Feed
A home feed for a hundred million users: where a timeline lives, how it is ranked inside a latency budget, what the celebrity accounts do to the write path, and the whole design under a viral hour.
- Lessons
- 5
- Exercises
- 29
- Minutes
- 34
- 1
Where a Timeline Lives
After this lesson you can size a per-user timeline store, choose its shape and cap, and say why it holds ids rather than posts.
DebugMultiple choiceShort answer - 2
Ranking Inside a Latency Budget
After this lesson you can lay out a candidate-score-rank pipeline that fits a feed's latency budget, and say what is precomputed and what is computed per request.
DebugCode orderMultiple choiceShort answer - 3
Celebrities, Follows and Unfollows
After this lesson you can handle the accounts above the fan-out threshold end to end, and keep timelines right when a user follows or unfollows.
DebugMultiple choiceShort answer - 4
Checkpoint: Feed VariationsCheckpoint
The same design under different numbers: a workplace feed, a digest, and a feed with no celebrities.
DebugMultiple choiceShort answer - 5
Boss: The Social FeedBoss
The whole design: the question, the numbers, the stores, the write and read paths, the viral hour, the missing post, the revised pipeline, and the tradeoff you defend.
Code orderMultiple choiceShort answerTrace