Status: Accepted (2026-11-28). Extends 0304 (rendezvous hashing) and 0701 (byte-accounted LRU).
A doc worker refuses a page whose estimated load (2.5x raw snapshot + 8 B/node) exceeds its LINORA_DOCWORKER_MAX_BYTES (2 GiB default) with 503, so pages near the 8M-node limit could not be queried at all. A page that fits but uses most of the cap is almost as bad: loading it evicts every other page of that worker, again and again. Making every worker big would multiply memory for the many small pages.
LINORA_DOCWORKER_URLS (regular) and LINORA_DOCWORKER_LARGE_URLS (the same binary with a bigger LINORA_DOCWORKER_MAX_BYTES). Rendezvous hashing picks a worker within each pool.estimatePageBytes in @linorahq/server-common), used by both the worker’s admission and the API’s routing: 2.5 x raw_bytes(newest snapshot) + 8 x node_count + 2.5 x tail_bytes. Counting the not-yet-compacted journal catches growth since the snapshot.page_snapshots, same round trip). Pages estimated at or above LINORA_DOCWORKER_LARGE_PAGE_BYTES go to the large pool. The default 1 GiB is half the regular cap, so one page never fills a regular worker.x-linora-page-too-large: 1. The API retries once on the large pool and remembers the page for 10 min (bounded cache, 10k pages), so its next requests go there directly. Without a large pool the 503 passes through. The internal header never reaches clients.LINORA_COMPACTOR_MAX_BYTES and LINORA_COMPACTOR_MIN_NODES, so it claims only the pages regular compactors leave alone (they never claim above (cap - 128 MiB) / 400 B nodes).linora_api_docworker_large_routed_total, linora_api_docworker_large_retried_total, linora_docworker_page_too_large_total.apps/api/test/queries.test.ts covers routing by estimate (snapshot and tail), fallback with retry and memory, pass-through without a pool, and that the header is never exposed. apps/docworker/test/worker.test.ts checks the worker’s header and counter.