AdvancedSystem-Design
45 min
Design a Social News Feed
System DesignCachingML RankingDatabases
Advertisement
Interview Question
Design a personalized news feed for a social network with billions of events per day. Cover write fan-out vs read fan-out, ranking, and cold start.
Key Points to Cover
- Feed models: push (fan-out-on-write) vs pull (fan-out-on-read) and hybrids
- Storage: activity logs, user timelines, dedupe, TTL
- Ranking: features, freshness, graph signals, experimentation
- Caching: per-user feed cache; invalidation and precompute
- Systems: backfill, re-ranking, nearline vs offline pipelines
Evaluation Rubric
Chooses feed model with trade-offs25% weight
Designs efficient feed storage/caches25% weight
Outlines ranking and experimentation25% weight
Backfill, cold start, and reliability25% weight
Hints
- đź’ˇHot users and celebrities create write hotspots.
Potential Follow-up Questions
- ❓How do you prevent spam/duplicates?
- ❓What about “stories” style feeds?
Advertisement