News aggregator
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Design a news aggregator (Google News): the 60-second story

    Design a news aggregator

    300 outlets report one landing. You see one story, in minutes.

    Behind it: about 2 million articles a day from 100,000 publishers, copies spotted, events grouped, stories ranked per edition.

    120k/s

    requests on an election-results day

    But only about 23 articles a second arrive. Precompute on the small write side; cache the huge, mostly identical read side.

    How do you find new articles?

    Bad: Poll everything every minute

    3,300 fetches a second, nearly all unchanged.

    Good: Push, then poll adaptively

    WebSub pushes in seconds. Other feeds poll at their own rate: ≈150 fetches/s, mostly 304s.

    One wire report, fifty outlets. Count it once.

    MinHash each article’s 4-word shingles, in 20 bands of 6. Copies at 0.7 similarity collide 92% of the time; same-event rewrites at 0.3, 1.5%.

    A batch pass finds the Pimpri blast and the Pune factory fire are one story. Which ID survives?

    The trick

    The one it overlaps most. The other becomes a 301, so links, pins and clicks survive.

    A landing breaks at 18:00. It tops the Budget by 18:23.

    Each distinct publisher adds its authority, halved every 4 hours. 120 fresh sources outweigh 300 from the morning. No clicks, no editor.

    333/s

    reach the origin on results day

    300 CDN edges answer most of 72k shared-page requests a second. A shield tier of 10 coalesces their misses: up to 10k/s becomes 333/s.

    “For you”: personalise only the last step

    1. ≈ 800 candidates: edition, topics, co-visitation, clusters, local
    2. A light model re-ranks them in 4 ms
    3. Each click updates counts within seconds
    4. Under load, degrade a step at a time

    Remember

    Push plus adaptive polls find articles fast. Group copies, cluster stories with stable IDs, rank every minute. A CDN serves snapshots; personalise only the last step.