Design a Scalable News Feed System
You are building a news feed service for a large consumer mobile app with tens of millions of daily active users (DAU). Design the system end to end.
Scope
Specify:
-
Product requirements (functional and non-functional) and public APIs (post, follow/unfollow, getFeed).
-
Data models for posts, users, follow graph, home timeline entries, and interactions.
-
High-level architecture and data flow for posting, following, and fetching feeds.
-
Feed generation strategies: push (fan-out-on-write) vs pull (fan-out-on-read) and when to use hybrids.
-
Ranking: key signals, candidate generation, re-ranking; also deduplication, pagination/cursors, and real-time latency targets.
-
Capacity estimates: DAU, posts/day, feed reads QPS. Include storage choices (hot vs cold), sharding strategy, caches, search/indexing, and async workers.
-
Consistency models, backfill and re-ranking approaches, failure handling, rate limiting, abuse/spam controls.
-
Load testing methodology and plan for incremental rollout.