disaggregation -- prefill pool, decode pool, KV cache on the wire

Reading your prompt and writing the reply want different machines. Reading is one big burst of arithmetic over the whole prompt; writing produces a word at a time and spends most of its life hauling the model out of memory rather than calculating. Run both on one pool of machines and they get in each other's way, because a long prompt being read stalls every reply already in progress. So large deployments sometimes split the fleet and size each half for its own job. The catch is that the notes made while reading must then be shipped down a wire to the machine that writes, and a thin enough link costs more than the split saves.

Interactive page: the deployment consequence of the two inference regimes. Prefill and decode want opposite machines, so a serving fleet can stop asking one machine to do both -- run a prefill pool and a decode pool, and ship each request's KV cache from one to the other. Anchor: A4 KV cache / runtime shape (Family J, serving time). Companion to prefill-vs-decode, which shows why the two regimes have different shapes, and to chunked-prefill continuous-batching, which mitigate the same interference inside a single pool.

What it shows

Both deployments are simulated in-page tick by tick from the same request list, so every counter, tooltip and readout number is derived rather than annotated. The readout reports throughput, TTFT, TPOT and end-to-end latency for both, each ratio as a percent of the shared-pool baseline with its direction named.

The sweet spot is measured, not asserted. The strip above the allocation bar re-simulates the disaggregated deployment at every possible split and plots the resulting end-to-end latency, with the best one marked. Both failure modes are the two tall ends: too few prefill machines and prompts queue for compute; too few decode machines and prefilled requests queue for a slot.

The honest headline is the one the production runtimes give: disaggregation buys latency decoupling -- a first-token target and a per-token target that can be hit independently -- and not automatically raw throughput, because a shared pool can always put every machine on whichever phase is short of capacity.

Interaction

Press play (or scrub) and both deployments advance together against one shared time axis. Drag the allocation bar to move a machine between the pools, or drag the interconnect pipe up and down to widen or throttle the link -- the simulation, the sweep and every counter re-run under your hand. Hover a request, on either timeline or in the per-request breakdown strip, for its phase breakdown with the KV bytes and the transfer time; hover a worker for what it is doing and, when it is idle, which pool starved it; hover the sweep strip for the latency of every split.

Render tier

T1 (Canvas2D throughout -- the lesson is schedule and dataflow geometry, not pixel scale).

Wiring

layout.mount + controls (M, split, bw, nreq, gap, plen, seed), a max(makespan)-tick Transport both timelines read, onPointer handles for the allocation-bar and pipe drags, hover-to-inspect, two challenges (land on the sweet spot; throttle the link until it loses), and an A/B compare over the split. URL hooks: ?step, ?M, ?split, ?bw, ?nreq, ?gap, ?plen, ?seed, ?hover=x,y (the headless stand-in for a drag or a hover). Source: page.js.