Design a Web Crawler
Design a systeweb crawler tasked with methodically browsing and downloading content from the global internet.
Suggested time: 45 minutes
Loading the workspace...
About this problem
A web crawler is a program that systematically downloads web pages by following hyperlinks. It sounds simple, fetch a page, extract links, repeat. But at scale, every step hides a distributed systems problem. How do you avoid crawling the same page twice when a thousand machines are discovering URLs simultaneously? How do you respect each website's rate limits when you are targeting millions of domains? How do you store billions of pages without drowning in storage costs?
What your design needs to cover
Crawl web pages across millions of domains
URL deduplication
Respect robots.txt
Handle redirects and URL normalization
Recrawl pages to detect changes
Key challenges the editorial covers
Learn from other designs
Related problems
Design Google Search (hard)
Design Facebook’s Newsfeed (hard)
Guides
Asked in these interview guides
Company guides that list this problem among their sample questions.