Top Facebook System Design Interview Questions (Part 2) | Facebook Pirate Interview Round
Tags: beginners, tutorial, programming, career
Published: 2021-01-30 17:32:01

{% youtube Hq8pZ8G2Lm8 %}

Hi Everyone, in [our previous post](https://dev.to/theinterviewsage/top-facebook-system-design-interview-questions-31np), we discussed five of the most frequent Facebook system design interview questions that we have collected by browsing through multiple websites like LeetCode, Blind, 1point3acre, etc. To recap, we discussed the following:

1. [What are the System Design Interviews at Facebook?](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=0s)
2. [Design Facebook NewsFeed](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=72s)
3. [Design Facebook Status Search](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=383s)
4. [Design Live Commenting at Facebook](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=591s)
5. [Design Facebook Messenger or WhatsApp](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=772s)
6. [Design Instagram](https://www.youtube.com/watch?v=hykjbT5Z0oE&t=927s)

{% post https://dev.to/theinterviewsage/top-facebook-system-design-interview-questions-31np %}

In this post, we are summarizing another five of the frequent Facebook system design interview questions. We hope this post will benefit everyone in their interview preparation.

---

# 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](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8&t=63s)
Additional Resource: [Educative article on designing the proximity server](https://www.educative.io/courses/grokking-the-system-design-interview/B8rpM8E16LQ?aff=KQZl)

---

# 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](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8&t=414s)
Additional Resource: [Educative article on designing typeahead suggestions](https://www.educative.io/courses/grokking-the-system-design-interview/mE2XkgGRnmp?aff=KQZl)

---

# Design Privacy Settings at Facebook
On Facebook, we can set different privacy levels for the posts we publish to be only 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 levels of privacy for a post so that it is only visible to a particular set of users on Facebook.
2. To keep the discussion simple, implement two levels of privacy, Public and Friends, for this question.
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](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8&t=909s)

# 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 the popularity of a song can be determined by the frequency of the song being listened to in the past.

[Video Explanation](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8&t=679s)

---

# 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](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8&t=1210s)
Additional Resource: [Educative article on designing the web crawler](https://www.educative.io/courses/grokking-the-system-design-interview/NE5LpPrWrKv?aff=KQZl)

---

# 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 [this video](https://www.youtube.com/watch?v=Hq8pZ8G2Lm8).

{% youtube Hq8pZ8G2Lm8 %}

---

# Cracking the Facebook Behavioral Interview

In case if you have not read our series on Cracking the Facebook Behavioral Interview, we recommend reading it by clicking the below link:

{% post https://dev.to/theinterviewsage/top-facebook-behavioral-interview-questions-part-1-2a0o %}

---

# Useful Links

✅ [Educative.io Unlimited Plan [💰 10% off for first 100 users]](https://bit.ly/Educative-Unlimited)
✅ [TryExponent.com Membership [💰 Limited Time 10% offer]](https://bit.ly/Try-Exponent)

👩‍💻 [Best System Design Interview Course](https://www.educative.io/courses/grokking-the-system-design-interview?aff=KQZl)
🚀 [Complete SWE Interview Course [💰 Limited Time 10% offer]](https://bit.ly/SWE-Interview-Course)
🙋‍♀️ [Behavioral Interview Guide [💰 Special Discount]](https://www.buymeacoffee.com/interviewsage/e/30176)
📚 [Recommended Interview Preparation Book (on Amazon)](https://smarturl.it/InterviewPrepBook)

---

[![Buy Me a Coffee](https://dev-to-uploads.s3.amazonaws.com/i/o2l00b1bt3nl8fdfb0nn.png)](https://www.buymeacoffee.com/InterviewSage)

<center>☕️ Buy us a Coffee at <a href="https://www.buymeacoffee.com/InterviewSage">BuyMeACoffee.com/InterviewSage</a></center>

---

> 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! {% user theinterviewsage %}

[Full Disclosure & Disclaimer](https://disclosureanddisclaimer.theinterviewsage.com/)