Fetch a seed page and store it
The frontier holds URLs waiting to be fetched, starting with the seeds. A fetcher only waits on the network, so it hands everything after the download to other stages.
- The seed list goes into the frontier.
- A fetcher takes the next URL whose site may be fetched now, resolves it through a DNS cache and downloads the page, with time and size limits.
- It writes the raw page to object storage under the fetch’s id, plus a fetch record.
- It leaves a small parse task with the page’s location, and moves on.
Diagram as text
Components: DNS cache (Cache); Seed list (Component); Frontier (Queue); Fetcher (Worker); Website (External API); Parse queue (Queue); Fetch records (NoSQL DB); Object storage (Object store). Connections: Seed list → Frontier (1. seed URLs); Frontier → Fetcher (2. next URL); Fetcher → DNS cache (3. resolve); Fetcher → Website (4. GET); Fetcher → Object storage (5. raw page); Fetcher → Fetch records (6. record); Fetcher → Parse queue (7. parse task), asynchronous.
Read:Learn: Producer-consumer / work queueLearn: S3 / Blob Storage
Keep reading+1 min
What a fetch asks for
Ask for compressed responses, send a User-Agent that names the crawler, follow a few redirects at most, and stop reading at a maximum page size. Record the final URL after redirects too, because it is the one the seen set should know.
Keys for raw pages
Key each stored page by its fetch id, derived from the URL and the crawl cycle, so a repeated fetch overwrites the same object instead of adding a copy. Packing pages into large archive files, such as WARC files, keeps the object count down.
Check yourself