System design interviewers at Big Tech, such as Facebook, Google, and Microsoft often ask the candidates to design Facebook’s News Feed. Twitter’s timeline, Quora’s News Feed and Instagram’s News Feed will have similar architecture.
A News Feed is a collection of the trending stories on the homepage of the web application. It can include status updates, posts, comments, likes, photos, and videos from the user’s followees on the application.
System design interview questions are almost always open ended, so there’s never a standard answer. Ask your interviewer a set of questions until you have the key features, around which you can formulate an answer.
During a 45-minutes interview, you cannot be expected to produce a high level architecture close to the one Twitter actually uses, but the basics need to be covered well. So here are the key features a basic News Feed architecture should involve:
In applications like Facebook and Twitter, there are three different types of timelines:
This one includes the tweets from all the pages, groups and people that the user has followed.
This timeline displays all the tweets you have made. It appears on your profile page.
When the user searches a keyword, all the tweets that are related to that particular keyword appear on a timeline. This is the search timeline.
50% off Udemy courses
Grokking the System Design Interview
Java Multithreading for Senior Engineering Interviews
Grokking the Advanced Design Interview
Grokking the Coding Interview: Patterns for Coding Questions
Grokking Dynamic Programming Patterns for Coding Interviews
Coderust: Hacking the Coding Interview