Lesson 14 of 15
36. Design a Web Crawler

Sources

3 min read+10 XP

Source notes

  • Robots Exclusion Protocol: IETF RFC 9309, September 2022 (user-agent groups, longest-match rule with Allow winning ties, caching, handling of unavailable and unreachable robots.txt). Crawl-delay is not part of RFC 9309 and Google Search does not support it: Google Search Central blog, 2025. Checked 2026-10-08.
  • Python's urllib.robotparser evaluates rules in order of appearance: demonstrated in the chapter's code.
  • Front and back queues for prioritised, polite crawling: Allan Heydon and Marc Najork, "Mercator: A Scalable, Extensible Web Crawler", World Wide Web, 1999.
  • Near-duplicate detection with SimHash: Moses Charikar, "Similarity Estimation Techniques from Rounding Algorithms", STOC 2002; Gurmeet Singh Manku et al., "Detecting Near-Duplicates for Web Crawling", WWW 2007.
  • Page sizes, compression ratio, fetch time and URL counts are interview assumptions agreed in Step 1, not measurements of the web. Arithmetic computed 2026-10-08.
  • Frontier politeness, priority, robots.txt behaviour, URL normalisation, Bloom filter and host partitioning: tested 2026-10-08 (code/ch36_web_crawler.py, all checks pass).