KatInterview

Build a Ranked Daily Reading Feed from Thousands of Publishers

System DesignModel answer
MediumModel answerSystem Designsystem-designrecommendationranking

Last updated

Design a platform that pulls articles from many external publishers and serves each of millions of daily users a ranked, tailored feed in under 200ms, while staying up when sources fail.

Design a Tailored Reading Feed

Your team is building a product that collects articles from thousands of publishers, through RSS feeds and third-party news APIs, and shows each person a ranked list that reflects their interests and past behavior.

What the system must do

  1. Collect content. Regularly pull articles from outside publishers and convert them into one consistent format.
  2. Serve a tailored feed. For a given user, return an ordered list of articles.
  3. Learn from behavior. Capture clicks and other interactions so later feeds get better.

Targets

  • Scale: 10 million daily active users; about 10,000 new articles arrive per hour.
  • Speed: The feed must load in under 200ms.
  • Resilience: The product must keep working when some publishers are unreachable.

What your answer should cover

  • A high-level architecture and the flow of data between components
  • Data models for articles, user profiles, and interaction events
  • How articles are stored and indexed so retrieval is fast
  • How you rank content for each user
  • How you cope with traffic spikes and keep caches consistent

State your assumptions, include rough capacity numbers, and explain the trade-offs behind your main choices.

Hints

Hint 1

Do the arithmetic early: feed reads per second, article arrivals per second, and event volume. You will find that article writes are tiny, and the real difficulty is personalizing for millions of users within the latency budget.

Hint 2

Keep the write path (fetching and enriching articles) separate from the read path (serving feeds) with a message queue, so a slow or failing publisher never affects readers.

Hint 3

Do not score every article for every user. Think in two stages: a cheap step that narrows a few hundred thousand fresh articles to about a thousand candidates, then a heavier model that ranks only those.

Hint 4

Decide what to precompute versus compute on request. Precomputing feeds for all 10M users every few minutes is wasteful; consider lazy computation with caching and event-based invalidation.