DesignTheSystem/dev
MEDIUM Distributed Infrastructure Asked at Google, Microsoft, DuckDuckGo

Design Web Crawler

Design Web Crawler: Architect a scalable, highly-available distributed system capable of sustaining 25,000 peak RPS (40% reads). Maintain p99 latency under 80ms with 99.9% availability while optimizing monthly infrastructure cost within $1400/mo.

Category & DifficultyDistributed Infrastructure · MEDIUM
Traffic Profile25,000 RPS sustained, 35,000 RPS spike (40% reads / 60% writes)
Latency & Availability SLAp99 < 80 ms · 99.9% availability
Monthly Infra Budget$1,400/month
Commonly Asked AtGoogle, Microsoft, DuckDuckGo

Scale, traffic & SLA targets

To pass in the DesignTheSystem simulator, your architecture must hold all four targets simultaneously across a 60-second load run (spiking up to 35,000 RPS):

Peak traffic25,000 RPS40% reads / 60% writes
Latency (p99)< 80 ms99th percentile target
Availability99.9%Max error rate 0.10%
Monthly budget$1,400/moPriced per component

Functional & non-functional requirements

Functional scope

  • Fetch pages starting from seed URLs.
  • Find and follow new links.
  • Store pages for indexing.

Non-functional goals

  • p99 latency under 80 ms at the spike.
  • At least 99.9% of requests answered.
  • Costs no more than $1,400 a month.
  • Never hammer one website.
  • Don't fetch the same page over and over.

Core challenge: A queue of pages and a memory of seen ones

Workers take pages from a shared queue, fetch them, and add new links. A fast 'seen it?' check stops the same page being fetched twice, and politeness rules stop one site being hammered.

What breaks first?

A shared queue of URLs to fetch (the frontier), split by website host. Each worker takes URLs from its hosts, fetches them, and adds the new links it finds back to the queue.

Key architectural trade-offs

  • A Bloom filter will occasionally skip a page it has never seen.
  • Politeness delays limit how fast any single site is crawled.

Starting architecture & how to practise

The simulator starts you with a baseline setup: Traffic Ingress → App Service Tier → Primary Database. Run the baseline under 25,000 RPS to watch exactly which component saturates first, then add caching, queues, replicas, sharding or CDN until latency, availability and cost all turn green.

Common interview questions for Design Web Crawler

What are the target SLA and scale numbers for Design Web Crawler?

Design for 25,000 RPS sustained (spiking to 35,000 RPS) with a 40% read / 60% write mix, keeping p99 latency under 80 ms, availability at or above 99.9%, and infrastructure spend within $1,400/month.

What is the main architectural bottleneck in Design Web Crawler?

Workers take pages from a shared queue, fetch them, and add new links. A fast 'seen it?' check stops the same page being fetched twice, and politeness rules stop one site being hammered.

How can I verify my Design Web Crawler architecture works under load?

Open the live simulator to wire up load balancers, caches, queues, replicas, or shards and run a 60-second traffic simulation that grades latency, error rate, and monthly cost automatically.

Recommended lessons before you build

Related Distributed Infrastructure problems