Cross-Data-Center KVCache Transfer: Architecture Practices That Boosted Throughput by 54%

    This article explains how to make KVCache transfer between data centers practical for disaggregated prefill and decode inference. It introduces KV throughput (Φ_kv) as a metric for feasibility, shows how hybrid attention reduces Φ_kv by roughly an order of magnitude, and details a Prefill-as-a-Service architecture built on resource pool decoupling, selective offloading, and bandwidth-aware scheduling. Real-world results, boundary conditions, and deployment recommendations are included.

    1. The Problem: Prefill/Decode Disaggregation Is Bottlenecked by Bandwidth

    Large-scale LLM inference has converged on separating prefill from decode. The two phases have completely different resource profiles. Prefill is compute-intensive and consumes matrix-multiplication throughput. Decode is memory-bandwidth-intensive: it generates one token per step yet must read all weights and the KVCache each time. Running both on the same machine creates mutual stalls, where compute idles waiting on memory and memory idles waiting on compute.

    Disaggregation introduces a hard constraint: the KVCache produced during prefill must be shipped to the decode side. If that link runs over standard Ethernet instead of a dedicated low-latency, high-bandwidth network, bandwidth becomes the bottleneck immediately. The observed pattern in the industry is that a traditional dense-attention model with a 32K-token input can produce KVCache at roughly 60 Gbps per instance, while typical cross-data-center Ethernet sustains far less than that. As a result, PD disaggregation has been confined to a single high-speed network domain, unable to span facilities or regions.

    The deeper cost is that resource ratios become fixed. Once prefill and decode must fit into the same tightly coupled cluster, their hardware ratio is locked in at deployment time. Production traffic has clear daily peaks and troughs, mixes short and long requests, and drifts in context-length distribution. A fixed ratio inevitably leaves one side chronically overloaded and the other chronically idle, dragging down overall utilization.

    2. Key Metric: Describing Feasibility with KV Throughput

    Turning “can this cross data centers” from intuition into a computable question requires a common measure. Define KV throughput Φ_kv as the volume of KVCache data produced by the prefill stage per unit time, in Gbps.

    Its physical meaning is straightforward:

    1. Φ_kv ≈ (KV bytes per token per layer) × (number of layers) × (tokens processed in parallel per step) ÷ (prefill time per token)
    2. = KV byte density × prefill token throughput

    This equation shows two things. First, Φ_kv is strongly tied to model architecture, since KV byte density is determined by the attention mechanism. Second, Φ_kv scales with prefill speed: more compute and higher concurrency make network requirements more demanding. In other words, simply adding compute makes cross-facility transfer harder, not easier.

    In engineering terms, this yields three boundaries:

    • If Φ_kv is below the safe watermark of available link bandwidth (typically 60%–70% of nominal bandwidth), synchronous transfer is viable.
    • If Φ_kv approaches or exceeds link capacity, you must introduce compression, quantization, tiered transfer, or asynchronous pipelining.
    • If Φ_kv is an order of magnitude higher, synchronous cross-data-center transfer is not engineering-viable, and the model architecture must change.

    3. Breaking Through on the Architecture Side: Hybrid Attention Cuts Φ_kv by an Order of Magnitude

    The current mainstream approach is hybrid attention: a small number of full-attention layers interleaved with a large number of linear-complexity layers. Linear-complexity layers (various state-space/recurrent structures and sliding-window structures) do not store history in a way that grows linearly with context length; they maintain only a fixed-size state or a limited window, so KV byte density drops sharply.

    Layer-ratio patterns visible in public material include: a certain linear attention interleaved with latent attention at 3:1; sliding-window attention interleaved with grouped-query attention at 5:1; and lightweight linear layers interleaved with latent attention at 7:1. The more the ratio favors linear layers, the lower the KV output under long contexts.

    The measured difference in magnitude makes the point. With a 32K-token input, a hybrid-architecture model has a Φ_kv of about 4–5 Gbps, versus about 60 Gbps for a dense-attention model, roughly a 13x gap. What does 13x mean? Traffic that previously required a dedicated high-speed network now falls within the range that standard Ethernet can carry stably, and synchronous cross-data-center transfer becomes engineering-viable for the first time.

    Hybrid attention is not free, however. Linear layers may lose capability on precise retrieval and exact-copy tasks at very long context lengths. The ratio choice, layer placement, and whether to keep a few full-attention layers as “global anchors” are design decisions that must be evaluated against business corpora, not copied from a fixed proportion.

    4. Breaking Through on the System Side: Three-Layer Scheduling for Prefill-as-a-Service

    Architecture optimization alone is not enough. What actually makes cross-data-center deployment work is the combination of “model architecture + selective offloading + bandwidth-aware scheduling.” This can be abstracted as Prefill-as-a-Service:

    1. Resource pool decoupling. A high-compute cluster serves as the prefill service pool and the local cluster as the decode service pool, with each scaling independently.
    2. Selective offloading. Not every request is prefilled remotely; the decision is made based on expected benefit.
    3. Bandwidth-aware scheduling. Real-time link capacity acts as the constraint for admission and rate limiting, preventing congestion from triggering a tail-latency avalanche.

    The offloading decision can be written as a simple scoring function:

    1. def should_offload(req, link, cluster):
    2. kv_bytes = estimate_kv_bytes(req.input_len, req.model_cfg)
    3. # Compare transfer time against local queueing time
    4. t_transfer = kv_bytes / link.available_bytes_per_sec
    5. t_local_wait = cluster.prefill_queue_delay(req.input_len)
    6. t_remote_wait = cluster.remote_prefill_queue_delay(req.input_len)
    7. # Long inputs benefit more; short inputs have too high a transfer overhead ratio
    8. if req.input_len < MIN_OFFLOAD_TOKENS:
    9. return False
    10. if t_transfer > link.budget_bytes_per_sec * SLA_SLACK:
    11. return False
    12. return t_remote_wait + t_transfer < t_local_wait

    Three practical points:

    • Thresholds should be tiered by input length. Offloading short requests makes transfer overhead too large a share and actually raises time-to-first-token; long requests (tens of thousands of tokens and above) benefit most.
    • Admission control is mandatory. Available link bandwidth is a shared resource and needs token buckets or weighted fair queuing to keep burst traffic from saturating the cross-facility link and polluting the local decode fetch path.
    • Transfer and compute must overlap. Stream the KVCache in per-layer chunks so decode can start as soon as the first layer arrives rather than waiting for the full KV set. This is the key to a significant drop in P90 time-to-first-token.

    5. Results and Boundary Conditions

    In internal testing on a trillion-parameter-class hybrid model, this architecture delivered about a 54% throughput improvement over homogeneous PD deployment, with P90 time-to-first-token dropping about 64%. The gains break down into three sources: hybrid attention lowers Φ_kv by roughly an order of magnitude so the cross-facility link is no longer a hard block; resource pool decoupling lets prefill and decode scale independently along their own bottlenecks, eliminating idle capacity from fixed ratios; and pipelined transfer plus admission control holds down tail latency.

    The boundaries must also be acknowledged. If the model is still dense attention, Φ_kv stays high and synchronous cross-data-center transfer does not hold. If link quality jitters heavily with a high packet-loss rate, extra retransmission and verification budget is needed. If the workload is mostly short requests, the offload hit rate is naturally low and gains shrink noticeably. In addition, cross-facility operation involves data compliance and tenant isolation requirements; KVCache may contain sensitive context, so the transfer path needs encryption and minimization.

    6. Deployment Recommendations

    • Measure before deciding. Use the Φ_kv formula to run offline estimates for the target model and the typical input-length distribution, and confirm whether it falls within the range the link can carry.
    • Validate architecture changes incrementally. Verify hybrid attention ratios against a business evaluation set for retrieval and long-context capability rather than looking at throughput alone.
    • Make scheduling a layered policy. Handle admission globally by bandwidth and priority locally by queue length; route long requests to remote prefill and keep short requests closed locally.
    • Fill in observability. Build monitoring and alerting for link throughput, KV transfer latency, offload hit rate, and P90/P99 time-to-first-token, and use general-purpose logging and alerting capabilities to capture baselines and regression comparisons.
    • Decouple elastic scaling. Set separate scaling metrics for the prefill pool and the decode pool: queueing latency and compute utilization for the former, memory occupancy and decode step time for the latter.

    Overall, the feasibility of transferring KVCache across data centers does not depend on any single optimization but on the product of three factors: architecture reduces the data volume, the system decides when to transfer, and scheduling ensures the transfer is stable. If any one is missing, the 54% throughput improvement cannot be reproduced.