Skip to content

Resource · Guide or article

Design a web crawler

Covers a crawler that fetches links at very large scale, builds a reverse index, and serves search results with titles and snippets, without relying on tools such as Solr or Nutch. Suited to candidates preparing queue-heavy designs with large storage needs.

Reviewed

Open the original: Design a web crawler (opens the original site in a new tab)

Practice this topicOpens the practice interviewer in System design mode; choose a question there.

Add to a roadmap

Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.

Source content: English

A worked system design exercise from “The System Design Primer”. Steps: Outline use cases and constraints; Create a high level design; Design core components; Scale the design.

PrepKit overview

PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.

Suited to
The source does not state a level
Format
Guide

What it covers

  • Its assumptions of 4 billion pages crawled a month at 500 KB each produce 2 PB of stored content a month, 1,600 writes and 40,000 searches per second.
  • Keeps links_to_crawl and crawled_links in a NoSQL store, with Redis sorted sets for link priority, and sketches the crawler loop in Python.
  • Handles cycles and duplicates with page signatures, a MapReduce job for duplicate URLs, and Jaccard index or cosine similarity for content.
  • Sets recrawl timing with a weekly default, shorter intervals for popular sites, and optional robots.txt support.
  • Scaling covers query caching, sharding the index and document services, a local DNS cache and connection pooling.

How to use it

PrepKit study advice, not a claim made by the source.

Sketch the crawl loop and explain how the design avoids revisiting the same page. Then estimate storage yourself from the stated assumptions and check that you land near the page's monthly figure.

Scope and limitations

One possible design under the exercise's own assumptions. Page rank, personalization and search analytics are out of scope, and the search side is only sketched. Some suggestions, such as switching to UDP, appear in one line without any discussion of trade-offs.

Access and format

README on GitHub in the donnemartin/system-design-primer repository by Donne Martin, licensed CC BY 4.0. English, free to read online.

Reviewed by PrepKit on Oct 2, 2026. Listing source commit: ae9bbd7b02d9

Evidence behind this overview
  • solutions/system_design/web_crawler/README.md

Pages that include this

Get the PrepKit newsletter

Optional. You don't need it to use PrepKit.

How we handle your email