Skip to main contentSkip to user menuSkip to navigation
📱

Design a News Feed System

Twitter/Facebook-like Timeline with Real-time Updates & Personalization

💡

System Design Challenge

Build a scalable social media timeline system serving 300M users with personalized content ranking, efficient fan-out strategies for celebrity users, real-time updates, and sub-200ms timeline generation. Handle 500M tweets/day with advanced ML-driven content personalization.

❓ Clarifying Questions & Requirements

Q

What type of social media platform are we designing?

A

A Twitter-like microblogging platform with short-form content, following relationships, and real-time updates.

Key Insight: Focus on text posts with media attachments. Users follow each other to see content in personalized timelines.

Q

What's the expected scale of users and content?

A

300M daily active users posting 500M tweets per day globally.

Key Insight: Peak traffic during major events can reach 150M concurrent users. Average user follows 150 accounts and checks timeline 30 times daily.

Q

What are the core features beyond basic posting?

A

Personalized timeline, likes/retweets/replies, real-time notifications, trending topics, search, and media uploads.

Key Insight: Include advanced features like algorithmic ranking, spam detection, and content moderation at scale.

Q

How should we handle celebrity users with millions of followers?

A

Special handling required - some users have 50M+ followers creating massive fan-out challenges.

Key Insight: Need hybrid fan-out strategies to prevent system overload while maintaining real-time delivery for active users.

Q

What are the performance and consistency requirements?

A

Timeline loads must be <200ms, 99.9% availability, eventual consistency acceptable for social content.

Key Insight: Real-time updates preferred for active users, but slight delays acceptable for inactive users. Global distribution required.

Q

How important is content personalization vs chronological ordering?

A

Hybrid approach - blend algorithmic ranking with recency. Users should see most relevant content first.

Key Insight: Ranking algorithm should consider engagement likelihood, relationship strength, content quality, and trending signals.