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 & Difficulty | Distributed Infrastructure · MEDIUM |
|---|---|
| Traffic Profile | 25,000 RPS sustained, 35,000 RPS spike (40% reads / 60% writes) |
| Latency & Availability SLA | p99 < 80 ms · 99.9% availability |
| Monthly Infra Budget | $1,400/month |
| Commonly Asked At | Google, 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):
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
Shared state every server can see
Keep fast-changing state in one shared place instead of inside each server.
Queues: accept now, work later
Move slow work off the request and keep a queue from falling behind.
CDNs: serving from close to the user
Know which content belongs on a CDN and what it saves.
Related Distributed Infrastructure problems
Global Clickstream Analytics
Ingest 150,000 telemetry events/sec (100% writes). Buffer data with partitioned streams and batch-process to persistent storage.
Distributed Web Crawler Sync
Coordinate distributed URL frontier polling and storage for 10,000 pages/sec (60% writes). Use object storage for page bodies and separate fast deduplication filters.
Design Distributed Rate Limiter
Design a distributed rate limiter guarding downstream microservices against 60,000 peak requests/sec. Use fast in-memory token buckets to keep p99 latency under 15ms.
Design Search Autocomplete System
Design Search Autocomplete System: Architect a scalable, highly-available distributed system capable of sustaining 25,000 peak RPS (80% reads). Maintain p99 latency under 80ms with 99.9% availability while optimizing monthly infrastructure cost within $600/mo.