In 1999, Compaq Systems Research Center engineers Allan Heydon and Marc Najork showed that a single workstation running Java could crawl the open web faster per node than distributed C and Python crawlers by bounding memory across every core data structure. During an eight-day production run in May 1999, Mercator issued 77,357,381 HTTP requests at 112 documents/sec (1,682 KB/sec) on one Digital Ultimate Workstation, using synchronous worker threads and disk-backed queues designed to run on anywhere from 128 MB to 2 GB of RAM.

Unlike the early Google search engine (three to four crawler machines using asynchronous I/O) or the Internet Archive crawler (64-site shards with a 2 GB in-memory Bloom filter), Mercator kept its working set independent of corpus size by pushing the URL frontier, URL-seen table, and content fingerprint set onto disk with targeted in-memory caches.

  • Single-node throughput: 112 docs/sec (1,682 KB/sec) across all MIME types over 8 days (77.4M requests), versus 33.5 docs/sec (200 KB/sec) for Google and 46.3 HTML docs/sec (231 KB/sec) for Internet Archive on their respective setups.
  • Parallel DNS elimination: Replacing synchronized Java/Unix gethostbyname lookups with a multi-threaded resolver cut DNS elapsed time per worker thread from 87% down to 25%.
  • URL-seen locality trick: Combining a 2^18-entry (262,144-entry) clock cache with host-prefixed URL checksums achieved a 75.7% in-memory hit rate and reduced disk membership checks to 0.16 seeks and 0.17 reads per test.
  • Duplicate suppression: 64-bit Rabin-Broder document fingerprints caught 8.5% duplicate 200 OK responses before link extraction ran.
Published crawler download rates (different hardware and document sets)
Metric: sustained HTTP download throughput in documents/sec and KB/sec (higher is faster; Mercator fetched all MIME types while Internet Archive reported HTML only)
Mercator (1 workstation, all MIME types, 8 days)112 docs/s (1,682 KB/s)
Internet Archive (multi-machine, HTML only)46.3 docs/s (231 KB/s)
Google 1998 crawler (4+ machines, 9 days)33.5 docs/s (200 KB/s)

Source: Heydon and Najork (1999), Section 6.1. Hardware was not normalized across crawlers.

How It Works

Each of Mercator’s worker threads (hundreds running concurrently under Compaq’s srcjava runtime) runs a simple synchronous loop backed by four bounded-memory structures:

  • Host-partitioned URL frontier: A naive FIFO queue risks hammering one server with parallel requests whenever a page emits hundreds of local links. Mercator gives each worker its own disk-backed FIFO subqueue and hashes URLs by canonical host name into subqueues so at most one worker hits a given server at a time. To amortize disk writes and reads, each subqueue buffers 600 URLs in memory on both the enqueue and dequeue ends. For small intranet crawls with few hosts, a pluggable second frontier dynamically maps hosts to idle workers instead.
  • Custom HTTP, DNS, and RewindInputStream: Because JDK 1.1 sockets lacked timeouts and both Java and Unix gethostbyname serialized uncached DNS lookups, Mercator replaced both. Its custom HTTP client enforces a 1-minute timeout and checks a 2^18-entry LRU robots.txt cache (handling 3,675,634 robots.txt fetches and excluding 3,050,768 URLs in the 8-day run). Downloaded bodies stream into a per-thread RewindInputStream (RIS) capped at 64 KB in RAM and 1 MB on disk so multiple MIME-type analyzers can rewind and parse a response without re-fetching it.
  • Locality-preserving URL-seen table: Instead of a Bloom filter whose false positives silently drop unseen pages, Mercator stores canonical URL checksums in an in-memory buffer merged periodically into a sorted disk file. Crucially, each checksum places a host-name fingerprint in its high-order bits and the full URL fingerprint in its low-order bits, clustering relative links from the same host onto the same disk blocks.
  • Content-seen fingerprint set: A 64-bit Rabin-Broder checksum of each document body is checked against an in-memory table and sorted disk file (using interpolated binary search on an in-memory block index, costing at most one seek and one read per block miss) before link extraction runs.
Mercator’s bounded-memory pipeline and measured I/O behavior
URL frontier & RIS

600-URL in-memory head/tail buffers per disk subqueue; RIS holds up to 64 KB in RAM and caps backing files at 1 MB.

URL-seen test

66.2% clock-cache hits + 9.5% recent-table hits (75.7% total); 0.16 seeks and 0.17 reads per test.

Content-seen & CPU

64-bit Rabin fingerprints (2.3% of total CPU cycles) caught 8.5% duplicate 200 OK documents.

Source: Heydon and Najork (1999), Sections 3.2 to 3.8 and 6.1 to 6.2.

Key Findings

Continuous profiling with DCPI on the two-CPU Alpha workstation (2 GB RAM, 118 GB disk, 100 Mbit/s FDDI) showed Mercator spent 44% of CPU cycles in the Unix kernel, 37% in JIT-compiled Java bytecode, and 19% in the Java runtime. Because Mercator fetched images and binaries alongside HTML (69.2% text/html, 17.9% image/gif, 8.1% image/jpeg, with 80% of the 65.8M successful downloads between 1 KB and 32 KB), its average document size was more than double that of HTML-only crawlers, driving 1,682 KB/sec of sustained transfer.

Extensibility also proved lightweight in practice: adding custom protocol or analyzer subclasses took roughly 58 to 270 lines of Java, and reconfiguring Mercator as a random web walker required only 360 lines across a pluggable frontier and no-op fingerprint set.

Caveats and Builder Takeaway

  • Unnormalized throughput comparisons: Heydon and Najork explicitly note that the Google and Internet Archive papers lacked hardware specs to normalize against Mercator’s 533 MHz dual-Alpha box, so the raw docs/sec gap reflects newer hardware as well as architecture.
  • Virtual hosting and session traps: DNS canonicalization (CNAME or smallest IP) collapses distinct virtual-hosted sites that share one server IP without separate CNAME records. Likewise, content fingerprinting catches duplicate pages caused by embedded session IDs, but Mercator still has no automatic detector for infinite CGI crawler traps (operators must spot exploding host counts and add URL filter exclusions manually).
  • Exact deduplication only: Mercator’s 64-bit Rabin checksum catches byte-identical mirrors (8.5%), not pages differing in ads or timestamps (a gap later solved by 64-bit SimHash) and does not schedule recrawls as web pages change over time.

For engineers building crawlers or large-scale fetch pipelines today, Mercator’s lasting lesson is how far host-prefixed keys and small head/tail buffers stretch disk-backed state: preserving access locality in your hash keys cuts disk seeks far more cheaply than buying enough RAM to hold every frontier URL.