Intermediate LevelSystem Design & Architecture
How do you design a Distributed Web Crawler (like Google Bot)?
β Interview Prompt: Explain designing a Web Crawler, URL Frontier, politeness delay queues, HTML fetchers, Bloom Filters, and deduplication.
Designing a high-throughput Distributed Web Crawler (Google Bot):
Architecture:
1
URL Frontier: Prioritized crawling queue enforcing domain politeness delays (e.g. max 1 request per second per host IP).
2
HTML Fetchers: Asynchronous HTTP workers executing page fetches.
3
URL Deduplication: Uses a Bloom Filter to verify if a discovered URL has already been crawled before enqueueing.
4
Document Deduplication: Computes SimHash distance to detect duplicate content across different URLs.
Code Implementation Example
markdown
Distributed Web Crawler Architecture:
[URL Seed List] ββ> [URL Frontier Queue] ββ> [HTML Fetcher Pool]
β² β
β (Extract Links)
(Unvisited URLs) β
β βΌ
[Bloom Filter] <βββ (Check URL Duplicate)π‘Distributed Web Crawler architecture with URL Frontier and Bloom Filter deduplication.
π― Interview Key Takeaway
Design web crawlers using a URL Frontier for domain politeness and Bloom Filters for URL deduplication.
#System Design#Web Crawler#Bloom Filter#URL Frontier#Intermediate
Back to all System Design & Architecture Questionsβ