KatInterview

Build a Real-Time Story-Grouping News Feed Platform

System DesignModel answer
MediumModel answerSystem Designsystem-designdeduplicationclustering

Last updated

Design a platform that pulls in millions of articles daily, removes syndicated copies, groups coverage into evolving stories, and serves fast ranked feeds to tens of millions of users.

Problem

You are asked to design a news aggregation product. It continuously collects articles from a large set of publishers, recognizes republished or lightly edited copies, groups coverage of the same real-world event into one "story", and gives each reader a ranked, partly personalized list of current stories.

What the system must do

  • Collect: Regularly poll RSS feeds and publisher sites, extracting body text, metadata and publication time.
  • Remove copies: Catch byte-identical duplicates and near-identical syndicated versions (for example, wire-service text reposted by many outlets).
  • Group into stories: Put articles about the same event into one story entity, even when the outlets and wording differ.
  • Surface breaking news: Detect stories that are growing quickly and promote them.
  • Serve feeds: Offer an endpoint returning top stories per category, adjusted by simple user preferences (topics, followed or blocked sources).

Quality targets

  • A new article should be processed, deduplicated and clustered within 5 minutes of publication.
  • Feed reads: p99 under 150 ms.
  • Read path availability: 99.99%.
  • The system should absorb breaking-news surges where read traffic is 2-3x normal.

Scale

  • 50,000 publishers or feeds
  • 10 million new articles per day (about 120/s average, 500/s peak)
  • 50 million daily active users, around 25,000 read QPS at peak
  • Stories are clustered within a rolling 7-day window; older ones move to cold storage

What to cover in your answer

  1. End-to-end architecture, from fetching to the user-facing API.
  2. The dedup and clustering pipeline: algorithms and data structures (for example, locality-sensitive hashing for near-duplicates, and incremental vector matching versus batch clustering).
  3. Data model and storage choices for articles, stories and user interactions.
  4. Feed generation, caching and how you score breaking or trending stories.
  5. Trade-offs and edge cases: crawler politeness, drift in long-lived stories, spam and low-quality sources.

Hints

Hint 1

Split the system into a heavy asynchronous write pipeline (fetch, parse, dedup, embed, cluster, score) and a cheap, cacheable read path. Connect the stages with a durable log so you get replay and backpressure.

Hint 2

Do not run global clustering per article. Compare each new article against the centroids of currently active stories using an approximate nearest-neighbor index, and run a periodic batch job to repair merge and split mistakes.

Hint 3

Treat near-duplicates as signal, not waste: keep them linked to a canonical article so the story can show how many outlets carry it. Precompute feeds per category and region, and apply personalization only as a light merge and filter at read time.