Design a personalized news-feed system that ingests articles from many sources and builds a home feed. Connect requirements and APIs to data modeling, consistency, scaling, failure recovery, observability, and the important design trade-offs.
Design a personalized news-feed system that ingests articles from many sources and builds a home feed.
Users may follow topics and sources. A new user with no preferences should receive a reasonable default mix. Breaking news must be eligible for prominent placement for all users without permanently overriding personalization. Compare fan-out-on-read with fan-out-on-write and select a hybrid strategy.
### Constraints & Assumptions
- An article may arrive more than once from syndicated sources.
- Feed results need deterministic pagination while new articles continue to arrive.
- Source and topic preferences can change.
### Clarifying Questions to Ask
- What defines breaking news and who is allowed to assign that status?
- How fresh must ordinary and breaking items be?
- Do users need strict exclusion or only ranking preferences for sources and topics?
```hint Treat the feed as a merge
Candidate sets can come from subscriptions, precomputed defaults, and a small breaking-news lane before ranking and deduplication.
```
### What a Strong Answer Covers
- Ingestion, normalization, canonical article identity, enrichment, and indexing.
- Candidate generation for followed topics and sources plus a cold-start default pool.
- A justified fan-out strategy, ranking, stable cursors, caching, and invalidation.
- Controlled breaking-news insertion, expiry, deduplication, and abuse safeguards.
### Follow-up Questions
- How would you correct a falsely labeled breaking story?
- How would you avoid showing five syndicated copies of the same event?
- What changes for a user following thousands of sources?
Quick Answer: Design a personalized news-feed system that ingests articles from many sources and builds a home feed. Connect requirements and APIs to data modeling, consistency, scaling, failure recovery, observability, and the important design trade-offs.
Design a personalized news-feed system that ingests articles from many sources and builds a home feed.
Users may follow topics and sources. A new user with no preferences should receive a reasonable default mix. Breaking news must be eligible for prominent placement for all users without permanently overriding personalization. Compare fan-out-on-read with fan-out-on-write and select a hybrid strategy.
Constraints & Assumptions
An article may arrive more than once from syndicated sources.
Feed results need deterministic pagination while new articles continue to arrive.
Source and topic preferences can change.
Clarifying Questions to Ask Guidance
What defines breaking news and who is allowed to assign that status?
How fresh must ordinary and breaking items be?
Do users need strict exclusion or only ranking preferences for sources and topics?
What a Strong Answer Covers Guidance
Ingestion, normalization, canonical article identity, enrichment, and indexing.
Candidate generation for followed topics and sources plus a cold-start default pool.
A justified fan-out strategy, ranking, stable cursors, caching, and invalidation.
Controlled breaking-news insertion, expiry, deduplication, and abuse safeguards.
Follow-up Questions Guidance
How would you correct a falsely labeled breaking story?
How would you avoid showing five syndicated copies of the same event?
What changes for a user following thousands of sources?