[System Design Tech Case Study Pulse #65] 3 Billion Daily Active Users : How Facebook News Feed Algorithm Actually Works
With detailed explanation and flow chart....
Hi All,
Facebook's News Feed Algorithm is a engineering marvel, capable of serving personalized content to 2.9 billion daily active users with less than 50ms latency, leveraging PyTorch for machine learning and Cassandra for data storage. This sophisticated system forms the core of Facebook's user experience, delivering relevant and engaging content to users in real time.
Let me deep into how this system works, exploring the key components, technologies, and processes that enable such massive scale, low latency content delivery.
Learn how to Design Facebook Newsfeed
System Overview
Daily Active Users (DAU): 2.9 billion
Posts processed daily: 4+ billion
Peak requests per second: 10 million+
Average feed generation time: < 50ms
ML model inference time: < 10ms
Cassandra read latency: < 5ms for 99% of queries
PyTorch models in production: 1,000+
Features considered per post: 100,000+
Data points processed daily: 100+ trillion
Global data centers: 15+
Edge locations: 100+
System availability: 99.99%
How Real World Scalable Systems are Build — 200+ System Design Case Studies:
[System Design Case Study #27] 3 Billion Daily Users : How Youtube Actually Scales
[System Design Tech Case Study Pulse #17] How Discord's Real-Time Chat Scales to 200+ Million Users
How it works ( Behind the tech)—
1. User opens the Facebook app or website:
- The client-side SDK initializes and establishes a connection with Facebook's servers.
- The SDK sends user information and device details to the Real-time User Activity Service.
2. Real-time User Activity Service processes user data:
- Updates the user's interest profile based on their recent activities and interactions.