KVCache Transfer Across Data Centers: Architecture Evolution and Practice for LLM Inference

    In large language model (LLM) inference, the bandwidth required to transfer KVCache between the Prefill and Decode stages has long locked both stages into the same data center, making heterogeneous deployment and elastic scaling nearly impossible. This article explains how hybrid attention architectures reduce KVCache volume by an order of magnitude, enabling a Prefill-as-a-Service architecture that offloads long-context Prefill to remote high-compute clusters over ordinary Ethernet. It covers the bandwidth dilemma of traditional PD-disaggregated architectures, the workflow of cross-data-center KVCache transfer, and the system-level scheduling strategies—selective offloading and bandwidth-aware scheduling—that make it viable. Real-world tests on a 1T-parameter hybrid model show 54% higher throughput and 64% lower P90 TTFT compared with homogeneous PD deployment.

    KVCache Transfer Across Data Centers: Architecture Evolution and Practice for LLM Inference

    In large language model (LLM) inference, balancing compute power against memory bandwidth has always been a core challenge. For a long time, the Prefill and Decode stages have been chained together inside the same data center—and that chain is KVCache transfer bandwidth. Under traditional architectures, the KVCache produced during Prefill can demand tens of Gbps of throughput, forcing both stages to share the same RDMA high-speed network. This makes heterogeneous deployment and elastic scaling practically impossible. However, with the rise of next-generation hybrid attention architectures, this situation is changing fundamentally. Cross-data-center transfer is moving from “impossible” to “worth engineering seriously.”

    1. The Bandwidth Dilemma of Traditional PD-Disaggregated Architectures

    PD disaggregation has become the standard paradigm for large-scale LLM inference. The core idea is straightforward: the Prefill stage is compute-intensive and suits clusters with high compute density, while the Decode stage is memory-bandwidth-intensive and suits clusters with large memory capacity and high bandwidth. Splitting the two should, in theory, greatly improve resource utilization.

    In reality, once Prefill and Decode are assigned to different nodes, the KVCache generated by Prefill must be transferred across nodes to the Decode nodes. The industry commonly uses a key metric—KV throughput (Φkv), the volume of KVCache data produced per unit of time—to measure this pressure.

    Take a typical dense-attention LLM as an example. Measurements on high-end GPU clusters (such as 8×H200 instances) show that when the input length reaches 32K tokens, a single instance produces KVCache at a rate of roughly 60 Gbps. This far exceeds the typical capacity of ordinary cross-data-center Ethernet. The enormous data throughput effectively locks PD-disaggregated architectures inside a single RDMA network domain. Worse, this tightly coupled deployment fixes the hardware ratio between Prefill and Decode, preventing dynamic adjustment in response to fluctuating traffic patterns and causing severe resource waste.

    2. The Opening Created by Hybrid Attention Architectures

    The breakthrough comes from evolution at the model architecture level. Today’s mainstream hybrid attention models stack a small number of full-attention layers with a large number of linear-complexity layers, fundamentally shrinking the KVCache footprint.

    Common hybrid strategies in the industry include:

    1. Hybrid of Delta attention and Multi-head Latent Attention (MLA): Some frontier models alternate these two mechanisms at ratios of 3:1 or 7:1. The full-attention layers preserve global context capture, while the Delta layers drastically reduce the storage and transfer cost of KVCache.
    2. Hybrid of Sliding Window Attention (SWA) and Grouped-Query Attention (GQA): Combined at a 5:1 ratio, SWA retains only the KV pairs within a local window, while GQA already compresses KV heads through sharing. Together, they significantly reduce KV throughput Φkv in long-context scenarios.

    With KVCache volume reduced by an order of magnitude, ordinary cross-data-center Ethernet bandwidth is now sufficient to carry the transfer load. This provides the physical foundation for fully decoupling the Prefill and Decode stages.

    3. A Deep Dive into the Prefill-as-a-Service Architecture

    Building on these model-level advances, the industry has proposed an innovative architecture called Prefill-as-a-Service (PaaS). The core idea is to selectively offload long-context Prefill tasks to independent, high-compute clusters in remote data centers, then transfer the generated KVCache back over ordinary Ethernet to the local PD cluster for decoding.

    The workflow can be abstracted into the following steps:

    1. Request routing: The gateway receives inference requests and evaluates the context length. If it exceeds the compute threshold of the local Decode cluster, the request is routed to the remote high-compute Prefill cluster.
    2. Remote Prefill computation: The remote cluster uses its high-density compute resources to quickly process the prompt and generate the compressed KVCache.
    3. KVCache serialization and transfer: The KVCache is serialized, chunked, and transmitted to the local cluster through a bandwidth-aware network channel.
    4. Local Decode resumption: The local PD cluster receives the data, deserializes it, and injects it into the Decode engine’s memory to begin token-by-token generation.

    In internal tests on a 1T-parameter hybrid model, this approach achieved a 54% throughput improvement and a 64% reduction in P90 TTFT (Time To First Token) compared with traditional homogeneous PD deployment. This means cross-data-center coordination not only avoided slowing down responses, but actually improved overall latency through compute offloading.

    4. System-Level Scheduling and Bandwidth-Aware Coordination

    It is important to emphasize that shrinking KVCache at the model level alone is far from enough. What truly makes cross-data-center deployment viable is the combination of model architecture optimization with system-level selective offloading and bandwidth-aware scheduling.

    4.1 Selective Offloading Strategy

    Not every request needs cross-data-center processing. The system must be able to evaluate requests dynamically:

    1. def route_request(prompt_length, local_compute_capacity, threshold):
    2. if prompt_length > threshold and local_compute_capacity < SAFE_LIMIT:
    3. return "remote_prefill_cluster"
    4. else:
    5. return "local_pd_cluster"

    Short-context requests are handled locally to avoid the overhead of network RTT, while long-context requests are offloaded to free up local compute capacity.

    4.2 Bandwidth-Aware Scheduling

    Cross-data-center network bandwidth fluctuates. The scheduling system must monitor link status in real time and dynamically adjust the concurrency of Prefill tasks. When bandwidth is tight, the system should reduce the Prefill rate or cache part of the KVCache on local nodes, preventing network congestion from starving the Decode stage.

    4.3 Cloud-Native Infrastructure Support

    Achieving this highly flexible distributed inference architecture requires strong underlying infrastructure. In practice, general-purpose cloud platforms such as Baidu AI Cloud provide container platforms and high-performance networking capabilities that make it easier to manage and schedule heterogeneous clusters. Through cloud-native network policy management, dedicated virtual LANs or bandwidth QoS guarantees can be provisioned for KVCache transfer, ensuring that critical inference traffic remains undisturbed.

    5. Conclusion and Outlook

    The proven feasibility of cross-data-center KVCache transfer marks the entry of LLM inference architecture into a new phase of decoupling. The 54% throughput improvement on a 1T-parameter model demonstrates that combining hybrid attention architectures with system-level co-design has successfully broken the long-standing rule that “Prefill and Decode must be co-located in the same data center.”

    Looking ahead, as distributed inference technology matures further, enterprises will be able to build truly “globally distributed, elastically scheduled” LLM inference networks based on compute cost, network pricing, and latency requirements. This will significantly lower the hardware barrier of thousand- and ten-thousand-GPU clusters and pave the way for the widespread adoption of large-scale AI applications.