Let’s discuss the high-level and detailed design of a newsfeed system based on the requirements discussed in the previous lesson.

High-level design of a newsfeed system

Primarily, the newsfeed system is responsible for the following two tasks:

  1. Feed generation: The newsfeed is generated by aggregating friends’ and followers’ posts (or feed items) based on some ranking mechanism.

  2. Feed publishing: When a feed is published, the relevant data is written into the cache and database. This data could be textual or any media content. A post containing the data from friends and followers is populated to a user’s newsfeed.

Let’s move to the high-level design of our newsfeed system. It consists of the above two essential parts, shown in the following figure: