KatInterview

Design a Real-Time Article Aggregation Platform

System DesignModel answer
MediumModel answerSystem Designsystem-designdistributed-systemscaching

Last updated

Design a scalable system that continuously pulls articles from tens of thousands of publisher feeds, deduplicates and clusters related coverage, and serves personalized ranked feeds under 100ms.

Background

You are tasked with designing a web-scale article aggregation platform — think of it as a system that tracks breaking news across the entire internet. The platform continuously fetches content from publisher feeds, groups articles covering the same event into unified story clusters, and surfaces a personalized reading experience to millions of simultaneous users.

What You Need to Build

Functional Requirements

  • Ingestion and Normalization: Pull articles continuously from a large set of registered publisher sources (RSS/Atom feeds, REST APIs, webhooks, and scrapers). Normalize inconsistent schemas into a unified article format. Track edits and revisions to articles over time.
  • Deduplication and Clustering: Identify and collapse duplicate or syndicated articles (the same story republished across outlets). Group the remaining distinct articles by the real-world event they cover into a single multi-perspective story unit.
  • Personalized Feed Serving: Return a paginated, ranked list of story clusters to each user. Rankings should reflect freshness, topic relevance to the user, source diversity, and coverage velocity. P95 read latency must stay under 100ms.
  • Retractions and Takedowns: When a publisher retracts an article or submits a copyright takedown, remove the content from search indices and edge caches within approximately five minutes.

Non-Functional Requirements

  • Read path availability: 99.99%
  • Ingestion is resilient to individual source outages
  • Crawlers must respect robots.txt, crawl delays, and per-domain rate limits
  • Raw article archives must support full replay so that new clustering and ranking algorithms can be back-tested or a corrupted index can be rebuilt from scratch

Scale to Design For

DimensionTarget
Registered publisher sources50,000
Ingest rate10M articles/day (~120/s avg, ~1,000/s peak)
Daily active users50M
Feed read requests200M/day (~2,500/s avg, ~10,000/s peak)
Raw article retention5 years
Active serving window14 days

Areas Expected in Your Answer

  1. High-level architecture: walk through the major subsystems — ingestion pipeline, processing workers, storage tiers, and the serving layer — and explain how data flows between them.
  2. Data model: describe how you store raw documents, article revisions, story clusters, and user interactions.
  3. Deduplication and clustering pipeline: explain the algorithm choices and the incremental vs. batch tradeoffs.
  4. Feed generation and caching: cover cache layers, the fan-out vs. pull-on-read decision, and how you keep feeds fresh while meeting the latency target.

Start by stating any clarifying assumptions you would make in a real interview before jumping into the design.

Hints

Hint 1

Before sizing anything, pin down two scope questions: how deep is personalization (per-user ML model vs. topic/locale affinity only), and is the five-minute takedown window a hard SLA or a soft target? These answers change the feed architecture and the deletion propagation design significantly.

Hint 2

For deduplication, think in two tiers: a cheap fingerprint check (SimHash or content hash) to catch syndicated copies, then a semantic embedding + ANN search to catch articles that cover the same event but were written independently. Running both in sequence keeps per-article cost low.

Hint 3

Fan-out-on-write to 50M inboxes is impractical when articles are shared across users. Instead, precompute small candidate pools (global, per-locale, per-topic) on a short refresh cycle, then do a lightweight per-user rerank at request time. This gives you personalization without the write amplification.