# Evaluation of a Newsfeed System’s Design

### Fulfill requirements <a href="#fulfill-requirements-0" id="fulfill-requirements-0"></a>

Our non-functional requirements for the proposed newsfeed system design are scalability, fault tolerance, availability, and low latency. Let’s discuss how the proposed system fulfills these requirements:

1. **Scalability:** The proposed system is scalable to handle an ever-increasing number of users. The required resources, including load balancers, web servers, and other relevant servers, are added/removed on demand.
2. **Fault tolerance:** The replication of data consisting of users’ metadata, posts, and newsfeed makes the system fault-tolerant. Moreover, the redundant resources are always there to handle the failure of a server or its component.
3. **Availability:** The system is highly available by providing redundant servers and replicating data on them. When a user gets disconnected due to some fault in the server, the session is re-created via a load balancer with a different server. Moreover, the data (users metadata, posts, and newsfeeds) is stored on different and redundant database clusters, which provides high availability and durability.
4. **Low latency:** We can minimize the system’s latency at various levels by:
   * Geographically distributed servers and the cache associated with them. This way, we bring the service close to users.
   * Using CDNs for frequently accessed newsfeeds and media content.

### Quiz on the newsfeed system’s design <a href="#quiz-on-the-newsfeed-systems-design-0" id="quiz-on-the-newsfeed-systems-design-0"></a>

<figure><img src="https://1055613405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlQzjDKRh_AaQvZflWz%2Fuploads%2FdNFZGcskaQtKLz1pCFmn%2FScreenshot%202023-09-06%20at%2012.28.07%20AM.png?alt=media&#x26;token=d048c7fe-31a8-40b8-9f37-e9ad79f55a8d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1055613405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlQzjDKRh_AaQvZflWz%2Fuploads%2FtdGIBfGbuzhoDRJNhiXQ%2FScreenshot%202023-09-06%20at%2012.27.35%20AM.png?alt=media&#x26;token=f49ecea7-5dc9-49f0-959e-487a38df4bc5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1055613405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlQzjDKRh_AaQvZflWz%2Fuploads%2FAWoJGKZFGRQggAtGVQMG%2FScreenshot%202023-09-06%20at%2012.28.40%20AM.png?alt=media&#x26;token=b49716e0-363d-4529-8838-b51887dd6888" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1055613405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlQzjDKRh_AaQvZflWz%2Fuploads%2F077PtAYeRHs3ZIZJUM9y%2FScreenshot%202023-09-06%20at%2012.29.30%20AM.png?alt=media&#x26;token=1be18501-c920-47b3-9352-4991bf33fe14" alt=""><figcaption></figcaption></figure>

### Summary <a href="#summary-0" id="summary-0"></a>

In this chapter, we learned to design a newsfeed system at scale. Our design ranked enormous user data to show carefully curated content to the user for better user experience and engagement. Our newsfeed design is general enough that it can be used in many places such as Twitter feeds, Facebook posts, YouTube and Instagram recommendations, News applications, and so on.
