Design Facebook Status Search is a very popular system design interview question.
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.
Given that it will be a 45-minute interview round, you will be designing a system with a lower feature set. In this question, you will be asked to develop the backend of a system with the following key features:
- Enable the users to search the statuses that their friends and the pages they follow have posted on Facebook.
- For simplicity, consider that these statuses will only contain text for this particular question.
You can use the following framework to better answer the Design Facebook Status Search question in the interview. It will help you to maintain focus and answer it better.
- Key Features
- As discussed above
- 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
- REST APIs
- /statusSearch (Read API)
- /postStatus (Write API)
- High-Level Design
- How to build the Search Index for fast retrieval on a large scale?
- Application Layer
- Multiple Stateless Servers with Load Balancer (Round-Robin)
- Database + Search Index Design (Data Layer)
- Schema design
- SQL vs. No-SQL
- Hash-based sharding
- Consistent Hashing
- Replication (for Fault Tolerance)
- Read + Write Consistency
- Caching for Fast Retrieval
- Eviction Policy - LRU
- Detailed Architecture Diagram
If time permits, you can also discuss the following towards the end of the interview:
- Security, for example, ACL (Access Control List)
- Statuses which can also contain media (photo & video) along with text
Learn more about the Key Features, Design Goals, Scale Estimations, REST APIs, High-Level Design, and Detailed Architecture Diagram of this problem in this video.
❤️ Support us in creating free high-quality educational content, and take advantage of services like
📝 Detailed Resume Review
🎁 Special Discounts on Extras
🎉 Early Access to our content
📣 Shout-out in our videos.
☕️ Buy us a coffee: https://www.buymeacoffee.com/InterviewSage
🔗 Patreon: https://www.patreon.com/TheInterviewSage
👕 Premium Merch - The Coder Owl
💰 Use Promo Code "OWL10" at checkout to avail 10% off on entire store
🖥 Our Setup + 📚 Interview Books & Courses: https://kit.co/theinterviewsage