URL Crawler 00:00:01 Fetch one eligible public page A public library wants a search index of publishers that allow its crawler. First decide which host may be visited now, whether this URL is eligible, and whether a saved response can be revalidated. Extracting links comes after those decisions. The fetcher asks its region's frontier for hosts. one call brings many URLs, instead of one call for each. Check the applicable robots rules and the library's allowlist for the host and path. Skip an ineligible URL. 200 and 95 KB of HTML with a new ETag. 87 links, 12 of them new. Each goes to the shard that owns its host. Honor the site's published crawl policy and your agreed scope, rate limits and opt-outs. Persist fetch outcomes and discovered eligible links separately so retries do not duplicate the frontier. 00:00:57 A busy news site still gets a rest News changes frequently, a small blog less so, and both have a visitor budget. A single global priority queue would let the hottest host absorb every available worker. News has the most valuable URLs. All hosts are free. Its value is highest. After the fetch the host must rest for a second. Only the blog is ready. Nobody is ready. The worker waits until the earliest time in the heap. Keep host eligibility time separate from URL priority. When nothing is ready, wait until the earliest host is eligible. More workers should not increase the load on a host whose budget is already spent. 00:01:37 Has the library already seen this address? A Bloom filter keeps a compact set of bits for previously observed URLs. Reusing a bit is normal. It explains why the structure can rule out membership while still producing a false positive. No URL has been seen. Three hash functions choose bits 1, 4 and 7. Bits 2, 4 and 9. Bit 4 was set already, the others were not, so it is certainly new. In the tiny example the wasps URL finds that all its selected bits were set by other entries. The structure can only report a possible match. For an index where missing a page has a significant cost, confirm possible matches using an authoritative visited set. The filter saves lookups without becoming the final coverage authority. 00:02:24 A changed date does not make a new article Two copies of an article can differ by a footer while sharing almost all of the text. Compare a small SimHash fingerprint of weighted features to avoid treating every cosmetic change as a distinct result. For the first example feature, each one bit contributes a positive vote and each zero bit contributes a negative vote to its column. Read the second feature from left to right. Its six bits are one, one, zero, one, zero, zero. Each column gets one more vote. Each column is added. Above zero becomes 1. A page that changes one date keeps almost the same number. Hamming distance between fingerprints proposes a near-duplicate. Tune the threshold and preserve enough evidence to avoid merging distinct articles just because they discuss the same subject. 00:03:22 Revisit where a fresh copy is useful The publisher's latest page may already be in the library. A conditional request can establish that the saved representation is still current without transferring the entire document. The planner reads one bucket, not ten billion rows. Returns compete with new URLs, under the same pace rules. Not modified. No body comes, and our copy is still right. In the example one change in twenty revisits suggests a slower schedule. Cap extrapolation and continue watching for new evidence. A revisit estimator is a policy choice. Bound it by the library's freshness promise and the publisher's load budget; a long history of quiet pages cannot prove a page will never change.