Design a web crawler that keeps a search index supplied with fresh copies of the public web.
Functional
- Fetch pages from operator-supplied seeds and from links discovered while crawling.
- Obey robots.txt and the crawl delay directive, and never take a small origin down.
- Detect exact and near-duplicate pages so the index stores one copy of content that appears under many URLs.
- Prioritize recrawl: a news homepage matters more than a decade-old forum thread.
- Emit fetched documents to an indexing pipeline.
Non-functional
- Politeness is a hard constraint, throughput is a soft one.
- No single slow or hostile host may stall the crawl.
- A fetcher machine dying must not lose queued work.
- 20B known URLs across 250M registrable domains.
- 1B pages fetched per day: 1e9 / 86,400 is about 11.6k fetches/s average, plan for 20k/s peak.
- Median page 110 KB of HTML, about 30 KB gzipped on the wire.
- About 40 outlinks per page, so roughly 40B link events per day to deduplicate.
- Raw content storage grows about 30 TB/day.
- Default politeness: one request per host per 2 seconds, honoring an advertised crawl delay up to 30 s.
- Freshness target: a URL marked high priority is fetched within 5 minutes of becoming due, and p95 of fetched documents reach the index within 2 minutes.
Ranking and relevance scoring, the user-facing query path, JavaScript rendering (assume a separate headless renderer service), and the legal takedown workflow.
Loading editor...
Submit your design to grade it.
- The components and connections this prompt needs
- Structure: an entry point, data stores, async work, and failure handling
- The concepts you explain on the board or in Notes, in your own words
To pass, score 65 or more with every required component but one, and name at least half the concepts, or all of them if a component is missing.