Top Facebook System Design Interview Questions | Facebook Pirate Interview Round
Hi Everyone, we have spent multiple hours browsing through many websites like Blind, LeetCode, Glassdoor, CareerCup, 1point3acre, etc., to find the most frequent Facebook system design interview questions.
Due to the sheer volume of content, we have summarized the top questions with their explanation in a two-part video series to share them with a large audience, and everyone can benefit from them. 🙂
We hope that this video series and the resources in their description boxes will help you in your journey in preparing and succeeding in the system design interviews at various tech companies like Facebook, Google, Apple, Amazon, LinkedIn, etc.
Part 1
Part 2
System Design Interviews at Facebook
- This 45-minute round is also known as the Pirate Interview round at Facebook.
- In this round, you have to show off your design skills. The system design questions asked are typically more open-ended and rarely require coding. Most time is spent discussing and drawing on the whiteboard.
- The purpose of the interview is to assess the candidate’s ability to solve a non-trivial system design problem. Thus, the interviewer will ask you a broad design problem and evaluate your solution.
- Facebook Careers Link about Software Engineering interview process: https://www.facebook.com/careers/life/preparing-for-your-software-engineering-interview-at-facebook
Design Facebook News Feed
The news feed is an integral part of the user experience on Facebook. It displays updates from the friends and the pages followed by the user in a scrollable feed. In the Design Facebook News Feed question, design the following key features and their APIs.
- Facebook users should see the news feed containing posts and statuses from their friends and pages that they have followed.
- They can post and like statuses that may contain text, images, and videos.
- They can send friend requests to other users and follow other pages.
Additional Resources:
- Educative article on Designing Facebook News Feed
- InterviewBit article on Design Twitter
- High Scalability blog article
Design Facebook Status Search
Facebook provides a search bar at the top of its page to enable its users to search posts, statuses, videos, and other forms of content posted by their friends and the pages they follow. In this question,
- Develop a service to enable the users to search the statuses posted on Facebook by their friends and followed pages.
- Consider that these statuses will only contain text for this particular question.
Additional Resources:
- Educative article on Designing Twitter Search
- Twitter Engineering: Building a complete Tweet index
Design Live Commenting
This question is not related to Live Videos. This question is related to the active real-time feed of comments at the bottom of each post. Thus, in this question,
- Design the backend of a system that can enable real-time commenting on Facebook posts.
- The users should be able to see the new comments in real-time for the posts visible in front of their screen.
Additional Resource:
- Facebook Engineering: Live Commenting
Design Facebook Messenger or WhatsApp
Develop the backend of a messenger system that allows users to send instant messages to each other.
- Support 1:1 conversations between two users.
- Track the online or offline status of the users.
- If time remains, discuss more complex features like Group conversations and Push notifications.
Additional Resources:
- Educative article on Designing Facebook Messenger
- Facebook Engineering: Building Mobile-First Infrastructure for Messenger
- Facebook Engineering: Project LightSpeed
- InterviewBit article on Design Messenger
Design Instagram
Instagram is a top-rated mobile social network, where users can upload and share photos and videos with their followers. In the interview, we will design a simpler version of Instagram with the following features:
- Users can upload and share photos.
- They can follow other users.
- Like the photos posted on Instagram.
- Instagram users should get a scrollable feed of photos that are posted by the users they follow.
Additional Resources:
- Educative article on Designing Instagram (Free)
- Educative article on Designing Facebook News Feed
- High Scalability blog article
- Instagram Engineering: Making Instagram.com faster
Design Proximity Server
On Facebook, the proximity servers are used to discover nearby attractions such as places and events, which are then recommended to its users. In this question, develop the backend of the service with the following features:
- Users can add, update, and delete places.
- Given a location expressed as latitude and longitude, users can query all the nearby places within a given distance.
- One optional follow-up to this question is to also query events near a given place around a particular time. This basically adds the third dimension of time to the problem.
Additional Resources:
- Educative article on Designing Proximity Server
- Points of Interest (POI) using GeoHash
Design Typeahead Suggestions
Google predicts and suggests a list of autocomplete queries based on the characters that we have already typed in the search box. These suggestions are called typeahead suggestions, and they help enhance the user experience and better articulate their search queries. Thus, in this question:
- Develop a service that suggests the top ten search queries based on the characters already typed by the user in the search box.
- For simplicity, assume that the query’s popularity can be determined by the frequency of the query being searched in the past.
Additional Resources:
- Educative article on Designing Typeahead Suggestions
- InterviewBit article on Design Search Typeahead
Design Privacy Settings at Facebook
On Facebook, we can set different privacy levels for the posts we publish. We can make each post visible to a specific set of users like public, friends, friends of friends, etc.
- Develop a service that will enable a user to specify the different privacy levels for a post so that it is only visible to a particular set of users on Facebook.
- To keep the discussion simple, implement only two levels of privacy, Public and Friends.
- More complex levels like friends of friends and custom groups can be discussed towards the end of the interview if the time remains.
Design Top N Songs
This question is very similar to designing the system for Top N Trending topics. In this question:
- Develop the backend of the service to get the top N songs for a user over the past X days.
- For simplicity, assume that a song’s popularity can be determined by the frequency of the song being listened to in the past.
Additional Resource:
- YouTube video on Designing Top K Problem (Heavy Hitters)
Design Web Crawler
Like many search engines, Google uses a software program named Web Crawler to scan the world wide web. It downloads and indexes all the web pages to be made available for the search queries submitted by the users.
- Design the backend of a web crawler. Given a list of seed web pages, it should download all the web pages and index them for future retrieval.
- The service should handle duplicate web pages so that unique URLs are stored.
Additional Resources:
- Educative article on Designing a Web Crawler
- LeetCode Discuss: A web crawler that will crawl Wikipedia
- System Design Primer: Design a Web Crawler
Preparation Material for the above questions
Learn more about the design goals, scale estimations, high-level design overview, and detailed architecture diagram of these problems in the following videos:
Useful Links
✅ Educative.io Unlimited Plan [💰 10% off for first 100 users]
✅ TryExponent.com Membership [💰 Limited Time 10% offer]
👩💻 Best System Design Interview Course
🚀 Complete SWE Interview Course [💰 Limited Time 10% offer]
🙋♀️ Behavioral Interview Guide [💰 Special Discount]
📚 Recommended Interview Preparation Book (on Amazon)
This article is part of the series on System Design Interviews at Facebook. So, follow us to get notified when our next article in this series is published. Thanks for reading!