TOP FACEBOOK SYSTEM DESIGN INTERVIEW QUESTIONS (PART 1) | Facebook Pirate Interview Round
Top 10 Facebook system design interview questions
You may be asked to design Facebook Newsfeed, which displays a scrollable feed of status updates. These updates can contain photos, videos, or text. Users can post status updates or engage with status updates from accounts and pages they follow.
Functional requirements include:
Non-functional requirements include:
At a high level, this problem can be split into two parts: feed generation and feed publishing. For feed generation, you’ll want to determine how many feed items to store in memory for a user’s feed as well as whether the newsfeed should be generated or kept in memory for all users. For feed publishing, you’ll want to consider whether to use a “Push” or “Pull” model to publish feed data to users.
You may be asked to design Messenger, an instant messaging service through which users send messages to each other. Messages can contain text or other media attachments.
Functional requirements include:
Non-functional requirements include:
At a high level, you’ll need a chat server to manage communication between users. Each message a user sends will go to the server before going to the recipient. The server will also store the message in its database.
Some questions you’ll need to address for this problem are:
You may be asked to design Instagram or a similar photo-sharing service. Instagram allows users to upload photos and share them with other users.
Functional requirements include:
Redundancy and reliability are crucial to this system. You must ensure that no uploaded files are lost. You need to create redundancy to ensure that the system still runs in the event that one server fails. You’ll need to store multiple copies of each file across several storage servers. You’ll also have several replicas of services running in the system to protect your system from having a single point of failure.
How to answer system design interview questions
Your interviewers will give you an open-ended question like, “How would you design Messenger?” You’ll spend most of your time asking questions, presenting your thought process, and diagramming at the whiteboard. There is no right or wrong answer to these questions. Your goal is to show your design skills and understanding of the many components that constitute a scalable system.
We recommend approaching your answer like this:
Master these system design questions and more.
Join the thousands that have leveled up with our popular system design interview course.
You may be asked to design TinyURL or a URL shortening service. These services create shorter aliases for long URLs. The short aliases are known as “short links” and redirect users to the original URL.
Functional requirements include:
Non-functional requirements include:
You could use two solutions to ensure a short and unique key for a given URL: encoding actual URLs or generating keys offline. To scale your database, you’ll need to partition it to store information about billions of URLs. You could use either range-based partitioning or hash-based partitioning. You can also cache frequently accessed URLs so that application servers don’t always need to access backend storage.
You may be asked to design Uber or another rideshare service. Uber allows customers seeking rides to connect with available drivers in their proximity. The application has two types of users: drivers and customers.
The requirements for this system include:
This system’s design can include load balancers, notification servers, aggregation servers, driver location servers, QuadTree servers, and a QuadTree index. You use server replicas in case the driver location or notification servers die. You can also store data in persistent storage like solid state drives (SSDs) to provide fast input and output. You can recover data from this storage in the event that both primary and secondary servers die.
You may be asked to design Twitter or a similar social network. Twitter allows users to publish short-form posts called “tweets.” Twitter users can post tweets, favorite and retweet tweets, and follow other users.
Functional requirements include:
Non-functional requirements include:
This will be a read-heavy system. At a high level, you’ll need multiple application servers with load balancers to serve these requests. You’ll need an efficient database that can store new tweets and support a large number of reads. You’ll also need file storage to store photos and videos.