Requirements for Newsfeed System

Understand the requirements and estimation to design newsfeed system.

To limit the scope of the problem, we will focus on the following functional and non-functional requirements.

Functional requirements

  • Newsfeed generation: The system will generate newsfeeds based on pages, groups, and followers that a user follows. A user may have many friends and followers; therefore, the system should be capable of generating feeds from all friends and followers. The challenge here is that potentially there is huge content out of which our system needs to decide which content to pick (that might be relevant/interesting) for the user and to rank it further to decide which one to show first.

  • Newsfeed contents: The newsfeed may contain text, images, and videos.

  • Newsfeed display: The system should affix new incoming posts to the newsfeed for all active users based on some ranking mechanism. Once ranked, we show content to a user with higher-ranked first.

Non-functional requirements

  • Scalability: Our proposed system should be highly scalable to support the ever-increasing number of users on any platform (Twitter, Facebook, Instagram).

  • Fault tolerance: Since the system should be handling a large amount of data; therefore, partition tolerance (system availability in the events of network failure between the system’s components) is necessary.

  • Availability: The service should be highly available to keep the users engaged with the platform. The system can compromise strong consistency for availability and fault tolerance, according to the PACELC theoremThe PACELC theorem is an extension of the CAP theorem that states, in the event of network Partition, one should choose between Availability or Consistency; else, choose between Latency and Consistency..

  • Low latency: The system should provide newsfeeds in real-time hence the maximum latency should not be greater than 2 seconds.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy