Lesson 11 of 15
36. Design a Web Crawler

36.10 What would you say in the last five minutes?

3 min read+10 XP

Step 6: Wrap-up (5 minutes)

  • Bottlenecks: network concurrency (async fetchers), DNS (local caching resolvers), and politeness limits on big sites (more parallelism only where sites allow it).
  • Single points of failure: none central: nodes own hosts on a ring; url_state and storage are replicated.
  • Resilience: timeouts, size limits, trap detection, per-host circuit breakers, and never trusting HTML to be well formed.
  • Freshness: re-crawl intervals learned per page (shorter if the content hash keeps changing), sitemaps and RSS feeds as hints, conditional requests (If-Modified-Since, ETags) to skip unchanged pages cheaply.
  • Next with more time: JavaScript rendering for pages that need it (a separate, slower rendering pool), images and PDFs, language detection, and spam detection.

Memory code: "Gentle to every site, fast across all of them."