System Design: Newsfeed System

Learn about the basics of designing the newsfeed system.

What is a newsfeed?

A newsfeed of any social media platform (Twitter, Facebook, Instagram) is a list of stories generated by entitiesAn entity could be a page, group, friends, and followers of a user. that a user follows. It contains text, images, videos, and other activities such as likes, comments, shares, advertisements, and many more. This list is continuously updated and presented to the relevant users on the user’s home page. Similarly, a newsfeed system also displays the newsfeed to users from friends, followers, groups, and other pages, including a user’s own posts.

A newsfeed is essential for social media platform users because it keeps them informed about the latest industry developments, current affairs, and relevant information. It also provides them additional reasons to return and connect with a platform on a regular basis. Billions of users use such platforms. The challenging task is to provide a personalized newsfeed in real-time while keeping the system scalable and highly available.

This chapter will discuss the high-level and detailed design of a newsfeed system for a social platform like Facebook, Twitter, Instagram, etc.

Newsfeeds on a mobile application

How will we design the newsfeed system?

We have divided the design of the newsfeed system into the following three lessons:

  1. Requirements: In this lesson, we’ll identify the functional and non-functional requirements. We’ll also estimate the resource requirements to provide a personalized newsfeed to billions of users each day.
  2. Design: We’ll discuss the high-level and detailed design of the newsfeed system in this lesson. We’ll also describe the API design and database schema for our proposed design. Moreover, this lesson will also help us to rank newsfeed to provide a better experience to users.
  3. Evaluation: In this lesson, we’ll evaluate the design of the newsfeed system based on the non-functional requirements. We’ll also take a quiz to assess our understanding of the design of the newsfeed system.

Let’s list down the requirements for designing our version of the newsfeed system.