Move the KV, Not the Work: P2P Cache Sharing in llm-d
A request arrives and its 48K-token prefix is already sitting in a KV cache, but the pod holding it is busy. Route the request to the cache owner and it queues behind that pod's backlog; route it to an idle pod and that pod spends seconds recomputing work the cluster already did. Waiting and recomputing are both wrong answers. P2P (peer-to-peer) KV cache sharing adds the third option: send the request to the best pod for load, and move the finished KV to it.
A busy owner is only one way locality breaks. Load balancing may select another worker, or the required KV may have been generated by a different serving role. In every such case the llm-d router already knows how much of a request's prefix each candidate holds. With P2P, that knowledge becomes a transfer instruction: route the request to the best pod overall, then tell it where to fetch the missing prefix.
Replaying a real recorded coding-agent session that forks 43 parallel subagents over a shared 40K-token prefix, adding P2P removed every straggler branch a copy could exist for: p90 branch-start TTFT dropped from 11.2 s to 1.6 s (-86%), and each verified pull replaced ~13 s of prefix recomputation with a sub-second transfer.
This is not a universal speedup. When routing already produces a local hit, P2P correctly does nothing. When locality conflicts with load balance or serving topology, it can replace seconds of repeated computation with a peer transfer. The operating principle is simple: local hits first; portable reuse when locality breaks.
The rest of this post answers four questions: how expensive is a pull; whether it improves load-balanced serving; whether it preserves session history across prefill/decode (P/D) roles; and when it should stay inactive.

































