Top Facebook System Design Interview Questions | Facebook Pirate Interview Round

The Interview Sage
The Interview Sage
Published in
6 min readJan 31, 2021

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.

☕️ Buy us a Coffee at BuyMeACoffee.com/InterviewSage

Part 1

Part 2

System Design Interviews at Facebook

  1. This 45-minute round is also known as the Pirate Interview round at Facebook.
  2. 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.
  3. 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.
  4. 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.

  1. Facebook users should see the news feed containing posts and statuses from their friends and pages that they have followed.
  2. They can post and like statuses that may contain text, images, and videos.
  3. They can send friend requests to other users and follow other pages.

Video Explanation

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,

  1. Develop a service to enable the users to search the statuses posted on Facebook by their friends and followed pages.
  2. Consider that these statuses will only contain text for this particular question.

Video Explanation

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,

  1. Design the backend of a system that can enable real-time commenting on Facebook posts.
  2. The users should be able to see the new comments in real-time for the posts visible in front of their screen.

Video Explanation

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.

  1. Support 1:1 conversations between two users.
  2. Track the online or offline status of the users.
  3. If time remains, discuss more complex features like Group conversations and Push notifications.

Video Explanation

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:

  1. Users can upload and share photos.
  2. They can follow other users.
  3. Like the photos posted on Instagram.
  4. Instagram users should get a scrollable feed of photos that are posted by the users they follow.

Video Explanation

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:

  1. Users can add, update, and delete places.
  2. Given a location expressed as latitude and longitude, users can query all the nearby places within a given distance.
  3. 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.

Video Explanation

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:

  1. Develop a service that suggests the top ten search queries based on the characters already typed by the user in the search box.
  2. For simplicity, assume that the query’s popularity can be determined by the frequency of the query being searched in the past.

Video Explanation

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.

  1. 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.
  2. To keep the discussion simple, implement only two levels of privacy, Public and Friends.
  3. More complex levels like friends of friends and custom groups can be discussed towards the end of the interview if the time remains.

Video Explanation

Design Top N Songs

This question is very similar to designing the system for Top N Trending topics. In this question:

  1. Develop the backend of the service to get the top N songs for a user over the past X days.
  2. For simplicity, assume that a song’s popularity can be determined by the frequency of the song being listened to in the past.

Video Explanation

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.

  1. 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.
  2. The service should handle duplicate web pages so that unique URLs are stored.

Video Explanation

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:

Part 1: https://www.youtube.com/watch?v=hykjbT5Z0oE

Part 2: https://www.youtube.com/watch?v=Hq8pZ8G2Lm8

☕️ Buy us a Coffee at BuyMeACoffee.com/InterviewSage

--

--