notexOPENOverview
Notex/Systems/Design a news feed system

Design a news feed system

Always free to read

In this chapter, you are asked to design a news feed system. What is news feed? According to the Facebook help page, “News feed is the constantly updating list of stories in…

11

DESIGN CASE STUDIES

Design a news feed system

11 LESSONS · 13 MIN
  1. 11.01Design a news feed systemIn this chapter, you are asked to design a news feed system. What is news feed? According to the Facebook help page, “News feed is the constantly updating list of stories in…READING1 MIN
  2. 11.02Step 1 - Understand the problem and establish design scopeThe first set of clarification questions are to understand what the interviewer has in mind when she asks you to design a news feed system. At the very least, you should figure…READING1 MIN
  3. 11.03Step 2 - Propose high-level design and get buy-inThe design is divided into two flows: feed publishing and news feed building. Feed publishing: when a user publishes a post, corresponding data is written into cache and…READING1 MIN
  4. 11.04Newsfeed APIsThe news feed APIs are the primary ways for clients to communicate with servers. Those APIs are HTTP based that allow clients to perform actions, which include posting a…READING1 MIN
  5. 11.05Feed publishingFigure 11-2 shows the high-level design of the feed publishing flow. User: a user can view news feeds on a browser or mobile app. A user makes a post with content “Hello”…READING1 MIN
  6. 11.06Newsfeed buildingIn this section, we discuss how news feed is built behind the scenes. Figure 11-3 shows the high-level design: User: a user sends a request to retrieve her news feed. The…READING1 MIN
  7. 11.07Step 3 - Design deep diveThe high-level design briefly covered two flows: feed publishing and news feed building. Here, we discuss those topics in more depth.READING1 MIN
  8. 11.08Feed publishing deep diveFigure 11-4 outlines the detailed design for feed publishing. We have discussed most of components in high-level design, and we will focus on two components: web servers and…READING3 MIN
  9. 11.09Newsfeed retrieval deep diveFigure 11-7 illustrates the detailed design for news feed retrieval. As shown in Figure 11-7, media content (images, videos, etc.) are stored in CDN for fast retrieval. Let us…READING1 MIN
  10. 11.10Cache architectureCache is extremely important for a news feed system. We divide the cache tier into 5 layers as shown in Figure 11-8. News Feed: It stores IDs of news feeds.Content: It stores…READING1 MIN
  11. 11.11Step 4 - Wrap upIn this chapter, we designed a news feed system. Our design contains two flows: feed publishing and news feed retrieval. Like any system design interview questions, there is no…READING1 MIN

References

Step 4 - Wrap up
  1. How News Feed Works: https://www.facebook.com/help/327131014036297/
  2. Friend of Friend recommendations Neo4j and SQL Sever: http://geekswithblogs.net/brendonpage/archive/2015/10/26/friend-of-friendrecommendations-with-neo4j.aspx
KEEP EXPLORING

One note leads to another.

Back to the library →
⌕
Search across the entire library ⌘ K