Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Facebook Feed System Design

Visual Problem Diagram

Facebook Feed System Design architecture diagram

Scenario

Picture opening a social app after lunch to see what your friends have been up to. A friend posted ten minutes ago, yet the list you scroll, called the home feed, still looks like yesterday. The post did get saved, but the app was still busy getting it in front of everyone who follows your friend, and a famous page with tens of millions of followers can keep that work busy for a long time. A good answer explains how a new post reaches its followers quickly without making the person who posted wait, and what changes for accounts with huge followings.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

This problem asks you to design the home feed of a social network like Facebook, which is the list of posts you scroll through after you open the app, built from the people and pages you follow. A person writes a post, the people who follow them see it in their own list, and everyone can like it, comment on it, block someone, or stop following them. The list can be ordered by what the system thinks you will enjoy most, or simply by newest first.

In the interview you need to explain five things. First, how a new post reaches the home lists of the people who follow its author without making the author wait while that happens. Second, what changes for one page with tens of millions of followers compared with a friend who has a few hundred. Third, how one scroll stays fast for someone who follows thousands of accounts. Fourth, what the feed shows when putting the posts in order takes too long. Fifth, how the next page stays honest when the order moves between two scrolls. Ads and the inner workings of a ranking model can stay thin.

Constraints

Functional

Post an update. Follow, unfollow, or block. Scroll the home feed page by page. Like or comment. Switch between top posts and newest posts.

Non-functional

Most home scrolls finish in under 300 milliseconds, so the next posts appear before the thumb waits. The feed stays up almost all the time. A new post can take a few seconds to show up. The post itself stays saved once it is accepted.

Scale

About a billion people a month and hundreds of millions a day. Hundreds of millions of posts a day. Opening the home feed is the hot action, and those reads dwarf the writes.

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing