Case study: design a news feed
Interview question: design the home feed for a social app with 300 million daily users. Each person follows a few hundred accounts, and a few accounts have 50 million followers. Opening the app must show fresh posts in a blink. Where do you start?
In this lesson you'll learn to
- Turn the news feed question into requirements and rough numbers, including the fan-out cost.
- Compare fan-out on write and fan-out on read, and design the write path with an event log and fan-out workers.
- Solve the celebrity problem with a hybrid fan-out, and keep the feed lists small and rebuildable.
- Serve the feed with ranking hooks, hydration and cursor pagination.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.