Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 12 Next »

On this page.

Introduction

News feed is the constantly updating list of stories in the middle of the home page. It includes status updates, photos, links, video, etc.

Part 1 - Understand the problem and establish design scope

Accessible via Mobile App or/and Web App ?

Both

Features ?

Publish and See other posts (from other users)

How is sorted the news feed ?

Reverse chronological order

How many friends user can have ?

5000

Traffic volume ?

10 million per day, active users

Contain images, videos or just text ?

All.

Part 2 - High-Level design

2 flows :

  • Feed publishing → user publishes a post, corresponding data is written into cache and DB.

  • Newsfeed building → news feed is built by aggregating friends’ posts in reverse chronological order.

Part 3 - Deep dive design

Flow Feed Publishing

Focus is on Web servers and the fanout service.

Flow Newsfeed Retrieval

Focus is on the CDN and the News Feed Service :

  • Service fetches complete user and post objects from caches.

  • News feed is returned in JSON format back to the client for rendering.

Part 4 - Pros & Cons

  • Need to validate how to scale the DB (Master-Slave replication, Read Replicas, DB Sharding, etc.)

  • How to keep Web Tier Stateless

  • etc…

  • No labels