System design interview: design a news aggregator

A news aggregator collects articles from thousands of publishers, groups the ones that cover the same event into a single story, and shows readers a ranked, fresh front page. The interview is about three pieces: an ingest pipeline that polls feeds without hammering anyone, a way to recognize that fifty articles describe one event, and a ranking that balances freshness, importance and source variety while serving millions of readers from cache.

By Published 8 min read

1. Clarify the requirements

This is a generic aggregator in the style of Google News or Apple News, not a description of either. Settle early whether it also personalizes and whether it hosts full articles or links out; most interviews assume it links out to publishers.

  • Functional: ingest articles from a large list of publishers; group coverage of the same event; show a top-stories page per country and per topic; a personal "for you" section based on follows and reading history; search recent news.
  • Non-functional: breaking news appears within a few minutes of publication; the front page loads fast for millions of readers; one publisher cannot dominate a story; polite to publisher servers.
  • Out of scope unless asked: paywall handling, comments, push alerts (link them to a notification system), ads.

2. Estimate the scale

Back-of-envelope estimate for a large news aggregator (assumed figures)
QuantityAssumptionResult
Sources100,000 feeds, each polled every 10 minutes on averageabout 170 feed fetches a second
New articles2 million a dayabout 23 a second, with spikes during big events
Article storageabout 5 KB of extracted text and metadata eachabout 10 GB a day, under 4 TB a year
Readers50 million a day, 10 page loads eachabout 5,800 page loads a second on average, roughly 17,000 at peak
Back-of-envelope estimate for a large news aggregator (assumed figures). Scroll sideways on a small screen.

Ingest volume is small; a few machines could fetch everything. The work is in processing quality (extraction, deduplication, clustering) and in serving reads cheaply. That tells you where to spend interview time.

3. Define the API

GET  /v1/top?country=us&topic=all          -> 200 { stories: [{ storyId, headline, articles: [{ url, source, publishedAt }] }], generatedAt }
GET  /v1/stories/{storyId}                  -> 200 { headline, timeline, articles[] }
GET  /v1/for-you?cursor=...                 -> 200 { stories[], nextCursor }   (signed-in)
POST /v1/follows   { topic | source }       -> 204
GET  /v1/search?q=...&since=24h             -> 200 { articles[] }
POST /internal/sources  { feedUrl, country, language, pollMinutes }
Reader-facing reads plus an internal admin surface for sources.

4. Sketch the data model

Stores and their keys
EntityStoreKey fields
SourceRelational databasesource_id, feed URL, domain, language, country, poll interval, last ETag, error count
ArticleDocument or wide-column store, partitioned by dayarticle_id, canonical URL, source, title, text, published_at, language, entities, SimHash
Story (cluster)Document store plus cachestory_id, member article IDs, centroid vector, first_seen, last_updated, topic, score
Reader profileKey-value storeuser_id, follows, recent story IDs read, hidden sources
Search indexInverted index over recent articlesRolling window, for example the last 30 days
Stores and their keys. Scroll sideways on a small screen.

5. Ingest: poll feeds politely and extract articles

  1. ScheduleA scheduler keeps each feed's next poll time in a priority queue. Busy sources poll every few minutes; quiet ones back off to an hour. A domain gets at most a few concurrent requests.
  2. Fetch with conditional requestsSend the last ETag or Last-Modified value so an unchanged feed costs a 304 and no body. Respect robots rules and any rate the publisher asks for.
  3. ExtractFor each new item, fetch the article page, strip navigation and ads to get the title, body text, author and time, and resolve the canonical URL so tracking parameters do not create fake new articles.
  4. EnrichDetect the language, tag named entities (people, places, organizations) and compute an embedding of the text for clustering and personalization.

This is a much narrower job than a general crawl: the list of sources is known and curated. If the interviewer wants discovery of new sites, the web crawler walk-through covers frontier management and politeness at web scale.

6. From articles to stories: deduplicate, then cluster

Wire services and syndication mean the same text shows up on dozens of sites with small edits. Catch those first, so clustering and ranking do not count one report as fifty. A SimHash fingerprint maps a text to 64 bits so that similar texts differ in few bits; compare a new article's fingerprint with recent ones and treat a small Hamming distance as a near-duplicate.

import hashlib, re

def simhash(text, bits=64):
    """64-bit fingerprint: similar texts get fingerprints a few bits apart."""
    words = re.findall(r"[a-z0-9]+", text.lower())
    shingles = [" ".join(words[i:i + 3]) for i in range(max(1, len(words) - 2))]
    weights = [0] * bits
    for sh in shingles:
        h = int.from_bytes(hashlib.blake2b(sh.encode(), digest_size=8).digest(), "big")
        for b in range(bits):
            weights[b] += 1 if (h >> b) & 1 else -1
    return sum(1 << b for b in range(bits) if weights[b] > 0)

def distance(a, b):
    return bin(a ^ b).count("1")
SimHash over 3-word shingles. On a short test paragraph, a two-phrase edit differed by 15 bits and an unrelated story by 31; tune the threshold on labeled pairs from real articles.

Comparing against every recent fingerprint is too slow at scale. Split each 64-bit value into more blocks than the number of differing bits you allow (for example 4 blocks of 16 bits for a limit of 3) and index by block. Two fingerprints within that limit must match exactly on at least one block, so you only compare against articles that share a block.

  • Clustering into stories. Distinct articles about the same event use different words, so fingerprints are not enough. Compare a new article's embedding and named entities with the centroids of stories active in the last day or two. Join the closest story above a similarity threshold, otherwise start a new one.
  • Online, then repair. Assign articles one at a time as they arrive so breaking news appears quickly, and run a periodic batch job that merges stories that drifted together and splits ones that grew too broad.
  • Headline choice. Pick the story's display headline from a reputable, recent member article rather than generating one.

7. The architecture

  1. Ingest
    • Feed scheduler
    • Polite fetchers
    • Article extractor
  2. Processing
    • Enrichment (language, entities, embeddings)
    • Dedup (SimHash)
    • Story clustering
  3. Data
    • Article store
    • Story store
    • Search index (recent)
  4. Ranking
    • Top-stories job per country and topic
    • Personal ranker
  5. Serving
    • Cache of ranked pages
    • API servers
    • CDN
Ingest, story building and serving paths of a news aggregator. A feed scheduler hands due feeds to fetchers, which respect per-domain limits and conditional requests. New items go onto a queue to extractors, which produce clean article records. An enrichment stage detects language, tags entities, computes embeddings and fingerprints. A dedup and clustering service assigns each article to a story in the story store. A ranking job runs every minute or two per country and topic and writes ranked story lists to a cache. Readers hit a CDN and API servers that read the cached lists, add a small personal section from their profile, and return the page. A search index covers recent articles.

8. Rank stories, then sources within them

  • Story score. Combine how many distinct sources cover the event (a strong importance signal), how fast coverage is growing, how recent the newest article is, and topic weights for the section. Apply a time decay so yesterday's big story gives way to today's.
  • Source variety inside a story. Show several outlets with different perspectives and formats (report, analysis, local coverage) and cap any one publisher's share.
  • Personal section. Rank stories matching the reader's follows and history with a lighter model, and remove ones they already read. Personal ranking is the job of a recommendation system, which this section can reuse.
  • Experiments. Ranking changes are rolled out to a small share of readers first and compared with the current version; a feature flag service handles the split.

9. What breaks, and trade-offs to discuss

Failure modes worth naming
FailureEffectMitigation
Huge breaking eventThousands of articles an hour on one topic; clustering hot spotScale extractors from the queue; cluster against a short list of active stories; cache the story page aggressively
A source changes its page layoutExtraction returns empty or junk textValidate extraction quality per source; alert and fall back to the feed summary
Feed spam or a hijacked sourceJunk or misleading items appearSource allow-list, reputation scores, manual review queue for new sources
Ranking job failsFront page goes staleServe the last good page with its generation time; alert if it is older than a few minutes
Failure modes worth naming. Scroll sideways on a small screen.
  • Freshness or stability. Recomputing every minute shows breaking news fast but makes the page jumpy; a slower cycle is calmer but late. The cached page then behaves like any cache with a TTL, so its lifetime should match the recompute cycle.
  • Online or batch clustering. Online assignment is fast but drifts; batch is cleaner but slow. Use both.
  • Embeddings or entity overlap. Embeddings catch paraphrases; shared entities are cheaper and easier to explain. Combining them reduces false merges of different events about the same person.
  • Personalize more or less. Heavy personalization raises engagement but can narrow what people see; keep the shared top stories unpersonalized.

10. How to talk through it in the interview

Fictional example

Explaining story clustering in one minute
Interviewer
Forty outlets publish about the same earthquake. How does that become one story?
Candidate
First, near-identical copies of the wire report are caught by SimHash and counted once. Then each distinct article is compared with stories active in the last day using its embedding and named entities: the place, the time, the agencies quoted. Above a similarity threshold it joins the existing earthquake story; below it starts a new one.
Interviewer
What if two different earthquakes happen the same week?
Candidate
The place entities differ, so they stay apart, and the batch repair job splits any story whose members form two clear groups.
  • Spend little time on fetching; say "scheduled polling with politeness" and move on to processing.
  • Separate deduplication from clustering; candidates who merge them get stuck on follow-ups.
  • Close on caching the shared page, with the numbers from your estimate.

Practicing this design with Natively

News aggregation sounds easy until the interviewer asks how fifty articles become one story, so rehearse that explanation out loud. In a mock session over a call, Natively listens on your computer, keeps a transcript of both speakers, and can propose talking points for the question just asked, such as the difference between dedup and clustering. It can also turn your described pipeline into a diagram on request. Read the notes afterwards and time how long you spent on fetching compared with ranking.

Questions people ask

How would you design Google News in a system design interview?

Poll a curated list of publisher feeds on a schedule with per-domain limits, extract clean article text, drop near-duplicates with fingerprints, and cluster the rest into stories using embeddings and named entities. Rank stories every minute or two per country and topic, cache those pages, and personalize only a small section per reader.

How does a news aggregator detect duplicate articles?

It computes a fingerprint such as a 64-bit SimHash over word shingles, where similar texts produce fingerprints that differ in few bits. A new article is compared with recent fingerprints that share an indexed block, and a small bit distance marks it as a near-duplicate of a wire story already seen.

How are articles grouped into one story?

Each new article is compared with stories active in the last day or two by text embedding and shared entities such as places, people and organizations. It joins the closest story above a similarity threshold or starts a new one, and a periodic batch job merges or splits clusters that drifted.

How do you rank stories in a news aggregator?

Score each story by how many distinct sources cover it, how fast coverage is growing and how recent it is, with a time decay. Inside a story, show a varied set of outlets and cap any single publisher's share. Personal sections use a separate, lighter ranking over the reader's follows and history.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP