Understand the Problem
In this chapter, you are asked to design a news feed system. What is news feed? According to the Facebook help page, “News feed is the constantly updating list of stories in the middle of your home page. News Feed includes status updates, photos, videos, links, app activity, and likes from people, pages, and groups that you follow on Facebook” 1. This is a popular interview question. Similar questions commonly asked are to: design Facebook news feed, Instagram feed, Twitter timeline, etc.
Step 1 – Understand the problem and establish design scope
The first set of clarification questions are to understand what the interviewer has in mind when she asks you to design a news feed system. At the very least, you should figure out what features to support. Here is an example of candidate-interviewer interaction:
Is this a mobile app? Or a web app? Or both?
Both
What are the important features?
Interview: A user can publish a post and see her friends’ posts on the news feed page.
Is the news feed sorted by reverse chronological order or any particular order such as topic scores? For instance, posts from your close friends have higher scores.
To keep things simple, let us assume the feed is sorted by reverse chronological order.
How many friends can a user have?
5000
What is the traffic volume?
10 million DAU
Can feed contain images, videos, or just text?
It can contain media files, including both images and videos.
Now you have gathered the requirements, we focus on designing the system.
Finished reading?
Mark it complete to track your progress.