Design Facebook News Feed | Instagram | Twitter | Facebook System Design (Pirate) Interview Series
The Interview Sage
Posted on February 7, 2021
Hi Everyone, I recently got the Design Facebook News Feed question in my Facebook onsite interview round.
Key Features
I was asked to design the following key features:
- Facebook users should be able to see the news feed containing posts and statuses, from their friends and pages that they have followed.
- Users can post and like statuses that may contain text, images, and videos.
- They can send friend requests to other users
- They can follow other pages.
Detailed Framework
I used the following framework to answer this question in the interview. It helped me to maintain focus and answer it better.
- Key Features
- Design Goals
- Minimum Latency
- High Availability
- Partition Tolerance
- Eventual Consistency (CAP Theorem)
- Read vs. Write Heavy
- 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
- High-Level Design
- Feed Generation
- Feed Publishing
- Push vs. Pull
- Application Layer
- Multiple Stateless Servers with Load Balancer
- Database Design
- Schema design
- SQL vs. No-SQL
- Sharding
- Hash-based sharding
- Consistent Hashing
- Replication (for Fault Tolerance)
- Quorum
- Read + Write Consistency
- Caching for Fast Retrieval
- Eviction Policy - LRU
- Detailed Architecture Diagram
Optional
If time permits, you can also discuss the following towards the end of the interview:
- Push Notifications
- Security, for example, ACL (Access Control List)
Preparation Material for this question
Learn more about the design goals, scale estimations, high-level design overview, and detailed architecture diagram of these problems inΒ this video.
Cracking the Facebook Behavioral Interview
If you have not read our first article on Top Facebook Behavioral Interview Questions, we recommend reading it by clicking the below link:
β Top Facebook Behavioral Interview Questions (Part 1) | Facebook Jedi Interview Round π₯
The Interview Sage γ» May 15 '21
Cracking the Facebook System Design Interview
In case if you have not read our series on Cracking the Facebook System Design Interview, we recommend reading it by clicking the below link:
Top Facebook System Design Interview Questions (Part 1) | Facebook Pirate Interview Round
The Interview Sage γ» Jan 4 '21
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!
Posted on February 7, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
September 20, 2024
October 10, 2021
September 26, 2021