Web Crawler: When the Web Slows Down
Hard · system design problem
The sites you crawl slow to 1.5 s per page and a transit link starts dropping packets. Your fetchers have idle CPUs and a growing frontier — and you cannot add machines.
The scheduler pushes 4,000 URLs/s into the SQS frontier. Twenty fetcher hosts (the only IPs site owners allow-list) pull URLs, download the page from the web (~300 ms) and store it in S3. At T+20s a CDN-heavy region slows down: pages take 1.5 s. At T+50s a transit link starts dropping 30% of packets to the web. Fresh pages must be fetched within five minutes of being scheduled.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.