Skip to main content

Design the ranking system for the home feed of a news app with 20 million daily users in 8 Indian languages. The feed must load within 200 milliseconds.

System design · Pro 2

Short answer

Clarify what a good feed means: clicks, reading time, return visits, and limits on clickbait. Then a two-stage design: candidate generation from followed topics, language, location and trending stories, then a ranking model predicting several engagement signals, combined into one score. Add freshness and diversity rules, handle new articles, test offline, then A/B test.

Deeper answer

First agree on the goal. Clicks alone reward clickbait, so I would predict several signals, such as click, reading time, share and hide, and combine them with weights that the product team owns. The guardrail metrics are return visits and reports.

Data flow: the app logs impressions and actions with the position of each story. Candidate generation pulls a few hundred recent stories from sources such as followed topics, the user's language and city, embedding similarity to recently read stories, and trending items. A ranking model scores them with user, article and context features. A final step applies diversity, removes duplicates of the same event, and boosts freshness, because news loses value within hours.

Trade-offs: a heavier ranker is more accurate but must fit the 200 millisecond budget, so user features are precomputed and article features are cached. New articles have no engagement data, so they rely on content features and a small exploration share. Evaluate offline with NDCG on logged sessions, correcting for position bias, then run an A/B test. At scale, the feedback loop breaks first: the model only learns from what it already chose to show.

What a strong answer covers

Answer it out loud in the mock interview about 2.5 min

Follow-ups to expect

Common mistakes

Learn it

ML interviews

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.