The interview problem

Practice prompt

Long prompts disrupt token streaming for existing requests. Design separate prefill and decode pools, including transfer of attention state and recovery from failed handoffs.

Original practice, not a reported company interview. All worked numbers are illustrative. Interview date: not applicable. Written October 3, 2026.

1. Scope and assumptions

Assume compatible model revisions and KV layouts across pools. Disaggregation is a deployment option to benchmark, not an automatic throughput improvement. Include transfer latency and duplicate work in the cost model.

2. Architecture and decisions

Ingress → reserve decode capacity → prefill → transfer KV with manifest → verify handoff → decode stream

Reserve downstream capacity before expensive prefill when possible. Give the handoff a request ID, model digest, token count, layout version and integrity metadata. Transfer only to an authorized destination. Decode begins after validating the complete required state; incomplete transfers must not look like a shorter prompt.

Persist a small handoff state machine with a single stream owner. A retry may repeat prefill, but must not create two output streams. Bound retained KV on the producer while waiting for acknowledgement, and release both reservations after cancellation. Consider recomputation as a fallback when transfer recovery costs more than another prefill.

3. Work through the example

For a 1 GiB state and an assumed effective 20 GiB/s link, payload transfer alone is 50 ms. Add 10 ms setup and 20 ms handoff queueing for an illustrative 80 ms overhead. Avoiding 150 ms of decode interference leaves a 70 ms benefit under these assumptions; at 5 GiB/s, the 230 ms overhead loses.

4. Failure cases and trade-offs

A fast network link can still be oversubscribed by simultaneous prompts. Version skew makes transferred tensors unusable. Separate pools improve scheduling isolation but add failure states, memory duplication and capacity imbalance. Autoscale using both prompt work and active decode demand rather than a single request rate.

5. Validation and acceptance

Inject failures before transfer, mid-transfer and after decoder acknowledgement. Assert one stream owner and eventual reservation release. Compare time to first token and inter-token latency under mixed prompt lengths against a colocated baseline.

6. Follow-ups and self-review

When should a request stay colocated? Reward compatibility checks, downstream reservation, handoff ownership and a transfer-aware break-even calculation.

Sources and related practice

vLLM labels disaggregated prefilling experimental and documents the feature; this handoff protocol and cost model are original.

Read the primary technical reference

Reference retrieved October 3, 2026. Retrieval date is not an interview or source publication date. The reference supports the named concept; scenario, architecture, examples and rubric are original.

Continue with Schedule large and small models for document review; Design a streaming LLM inference service.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.