notexOPENOverview
Notex/Systems/Newsfeed retrieval deep dive
11.09LESSON 09 OF 11 · 1 MIN READ

Newsfeed retrieval deep dive

Always free to read
SECTION VIDEONewsfeed retrieval deep dive

Video coming soon. Start with the reading below.

COMING SOON

Figure 11-7 illustrates the detailed design for news feed retrieval.

Design a news feed system — original diagram 143

As shown in Figure 11-7, media content (images, videos, etc.) are stored in CDN for fast retrieval. Let us look at how a client retrieves news feed.

  1. A user sends a request to retrieve her news feed. The request looks like this: /v1/me/feed
  2. The load balancer redistributes requests to web servers.
  3. Web servers call the news feed service to fetch news feeds.
  4. News feed service gets a list post IDs from the news feed cache.
  5. A user’s news feed is more than just a list of feed IDs. It contains username, profile picture, post content, post image, etc. Thus, the news feed service fetches the complete user and post objects from caches (user cache and post cache) to construct the fully hydrated news feed.
  6. The fully hydrated news feed is returned in JSON format back to the client for rendering.
Progress is saved on this device.
KEEP EXPLORING

One note leads to another.

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