📌 links to resources that can help you get in-touch with this topic asap (visual explanations and diagrams are 🔥 there so have a look as this is smth you’ll need in your interviews):
A news feed is a constantly updating list of stories. Social media platforms like Facebook, Twitter, and Instagram use news feeds extensively to keep users engaged with the latest information from their friends, family, and interests.
Understanding the Problem
- What is a News Feed? It's an aggregation of content, typically posts, updates, or stories, presented to a user in a ranked or chronological order.
- Key Goals:
- Timeliness: Deliver content promptly.
- Relevance: Show users content they care about.
- Scale: Handle massive amounts of data and users.
- Engagement: Keep users scrolling and interacting.
Understand the Requirements and Scope
As with any system design problem, it's crucial to clarify the requirements. Some good questions to ask:
- What types of content will be in the feed? (Text, images, videos, links?)
- What is the scale of the system? (Number of users, posts per day, etc.)
- What are the key features? (Posting, liking, commenting, sharing?)
- How is the feed sorted? (Chronological, ranked by relevance?)
- What is the freshness requirement? (How quickly should new content appear?)
- Who can see a user's posts? (Friends, followers, public?)
Let's assume the following for our design:
- Users: Millions of daily active users (DAU).
- Content: Text, images, and videos.
- Features: Posting, liking, commenting.