Web Crawler at Scale
Polite and parallel.
The real web has billions of pages. A crawler at that scale runs on thousands of machines. And it must be polite, or websites will block it.

- Billions of pages
- Thousands of machines
- Must be polite
Crawling problems
Scale brings new problems. Politeness, so we never hammer one site, with a delay between requests to the same host, and respect for robots dot t x t. Duplicates, because many URLs show the same content, so we hash page contents. Traps, like endless calendars, so we limit depth. And freshness, so popular pages are revisited more often.
The large-scale design
At scale, the frontier is split by host name, so each host is handled by one worker, which makes politeness easy. The seen set holds billions of URLs, so it's sharded, or uses a compact structure called a Bloom filter. Pages go to object storage, and on to the search indexer.
| key | value |
|---|---|
| Frontier | split by host |
| One host | one worker, polite |
| Seen set | sharded or Bloom filter |
| Pages | to storage, then indexing |
Summary
A crawler at scale splits work by host to stay polite, removes duplicates, avoids traps, and revisits popular pages. Next, finding things nearby.
Key takeaways- Split by host
- Detect duplicates
- Avoid traps