Back to explorer
System Architectures• 45 Min

Design a News Aggregator (Google News)

HARD

Design a News Aggregator (Google News)

Google News ingests hundreds of thousands of articles published daily across thousands of media outlets, clusters stories covering the exact same event into a single headline card, and personalizes feeds to reader interests.


1. System Requirements

Functional Requirements

  1. Content Crawling: Ingest news articles via publisher RSS feeds, sitemaps, and direct web crawling.
  2. Deduplication & Clustering: Group disparate articles describing the same breaking news story into one cluster.
  3. Category Tagging: Classify articles into sections (World, Business, Technology, Science).
  4. Personalized Feed: Rank stories based on freshness, publisher authority, and reader historical clicks.

Non-Functional Requirements

  1. Freshness: Breaking news stories must appear in user feeds within $< 5\text{ minutes}$ of publication.
  2. High Read Throughput: Serve 50,000+ QPS of personalized feed views with low latency ($< 150\text{ms}$).

2. Article Deduplication via SimHash & MinHash

When multiple journalists cover a White House press release, their articles share 70%+ identical phrasing.

  • SimHash: Generates a 64-bit fingerprint of an article where similar text generates similar hash bit patterns (unlike cryptographic hashes like SHA-256 where 1 bit change flips 50% of bits).
  • Hamming Distance: If the Hamming distance between two SimHash fingerprints is $\le 3\text{ bits}$, the articles are marked as duplicates and merged into the same cluster.

Key Architecture Trade-Offs & Decision Matrix

Decision FactorChoice AChoice BSelected Architectural Rationale
Communication ProtocolREST over HTTP/2WebSockets / gRPCUse REST for stateless CRUD APIs; use WebSockets for low-latency bidirectional streaming.
State ManagementCentralized Distributed StoreLocal Memory with Sticky SessionsCentralized Redis / Database state allows seamless container auto-scaling and zero-downtime rolling deploys.
Concurrency ControlOptimistic Locking (version column)Pessimistic Locking (SELECT FOR UPDATE)Optimistic locking delivers superior throughput for low-conflict consumer operations.