✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥

User Privacy has been a critical topic currently for most tech companies.

On Facebook, you may have noticed that you can set different privacy levels for the posts you publish so that they are only visible to a specific set of users like Public, F…


This content originally appeared on DEV Community and was authored by The Interview Sage

User Privacy has been a critical topic currently for most tech companies.

On Facebook, you may have noticed that you can set different privacy levels for the posts you publish so that they are only visible to a specific set of users like Public, Friends, Friends of friends, etc.

Key Features

The privacy implementation design can be fairly complex, so we will limit it to a few core features that can be covered in a 45-minute interview round. In this question, you will be asked to develop the backend of a system with the following key features:

  1. 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.
  3. More complex levels like Friends of friends and Custom groups can be discussed towards the end of the interview if the time remains.

Privacy Settings At Facebook

Detailed Interview Framework

You can use the following framework to better answer the Design Facebook Privacy Settings question in the interview. It will help you to maintain focus and answer it better.

  1. Key Features
    • As discussed above
  2. Design Goals
    • Minimum Latency
    • High Consistency
    • Partition Tolerance
    • We will tolerate lower availability in the interest of high consistency (CAP Theorem)
    • Read vs. Write Heavy
  3. Scale Estimation
    • Daily Active Users (DAUs)
    • Read QPS
    • Write QPS
    • Data generated each day and over 10 years (Storage Utilization)
    • Approximate number of servers required
  4. REST APIs
    • /setPrivacyLevel (Write API)
    • /canView (Read API)
  5. High-Level Design
    • Discuss different privacy levels & data structure to define them.
    • Explain how the system will determine whether the post can be displayed to a specific user or not.
    • How to build the key-value store to persist the friends data of the users.
  6. Database Design (Data Layer)
    • Schema design
    • SQL vs. No-SQL
    • Sharding
      • Hash-based sharding
      • Consistent Hashing
    • Replication (for Fault Tolerance)
    • Quorum
      • Read + Write Consistency
  7. Application Layer
    • Multiple Stateless Servers with Load Balancer (Round-Robin)
  8. Caching for Fast Retrieval
    • Eviction Policy - LRU
  9. Detailed Architecture Diagram

Optional

If time permits, you can also discuss the following towards the end of the interview:

  1. Complex Privacy Levels
    • Friends of Friends
    • Custom Groups
  2. Security, for example, ACL (Access Control List)

Preparation Material for this question

Learn more about the Key Features, Design Goals, Scale Estimations, REST APIs, High-Level Design, Detailed Architecture Diagram, and Framework to effectively prepare and answer this top question asked in the System Design Interviews at Facebook.

⬇️ Detailed Notes on Design Privacy Settings at Facebook

Cracking the Facebook System Design Interview

If you have not read our first article on Top Facebook System Design Interview Questions, we recommend reading it by clicking the below link:

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:

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)

Buy Me a Coffee

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

To stay updated about new posts, Subscribe & Follow Us!

Subscribe to our YouTube channel Follow us on Instagram Like & Follow us on Facebook Follow us on Twitter Follow & Connect on LinkedIn

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!

.ltag__user__id__553012 .follow-action-button { background-color: #3b49df !important; color: #f9fafa !important; border-color: #3b49df !important; }
theinterviewsage image

Full Disclosure & Disclaimer


This content originally appeared on DEV Community and was authored by The Interview Sage


Print Share Comment Cite Upload Translate Updates
APA

The Interview Sage | Sciencx (2021-12-11T17:11:43+00:00) ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥. Retrieved from https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/

MLA
" » ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥." The Interview Sage | Sciencx - Saturday December 11, 2021, https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/
HARVARD
The Interview Sage | Sciencx Saturday December 11, 2021 » ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥., viewed ,<https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/>
VANCOUVER
The Interview Sage | Sciencx - » ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/
CHICAGO
" » ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥." The Interview Sage | Sciencx - Accessed . https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/
IEEE
" » ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥." The Interview Sage | Sciencx [Online]. Available: https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/. [Accessed: ]
rf:citation
» ✅ Design Privacy Settings At Facebook | System Design Interview (Pirate Round) 🔥 | The Interview Sage | Sciencx | https://www.scien.cx/2021/12/11/%e2%9c%85-design-privacy-settings-at-facebook-system-design-interview-pirate-round-%f0%9f%94%a5/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.