Model or dataset
kvcache-ai/Mooncake avatar
kvcache-ai/Mooncake

Mooncake: A KVCache-Centric Disaggregated Architecture for LLM Serving

Mooncake is the serving platform for Kimi, a leading LLM service provided by Moonshot AI.

7,040 stars1,482 forksC++Apache-2.0

At a glance

What is it?
Mooncake is the serving platform behind Kimi, using a KVCache-centric disaggregated architecture to boost throughput. This review examines its mechanism, integrations, and trade-offs for engineers considering adoption.
Who is it for?
Adopt Mooncake if you run large-scale LLM serving with disaggregated prefill/decode or need high-throughput KV cache sharing across nodes, especially with RDMA-capable hardware. Skip it if your workload is single-node or you lack the infrastructure to manage a distributed cache pool.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • kvcache-ai/Mooncake7,040 ★ · +931
Star history
Repository2026-07-312026-11-14
kvcache-ai/Mooncake6.1k7k

931 Stars in the last 106 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What Mooncake Solves and Who It Is For

Mooncake addresses a specific bottleneck in large-scale LLM serving: the memory and bandwidth cost of KV caches. In standard serving, each request's KV cache is tied to a single GPU, which limits batch size and creates inefficiencies when prefill and decode phases have different resource profiles. Mooncake decouples these phases by making the KV cache a first-class, distributed resource. The project is the serving platform for Kimi, Moonshot AI's LLM service, and the README claims that under real workloads this architecture lets Kimi handle 75% more requests while still meeting SLOs. That number comes from the project itself; you should treat it as a vendor-reported figure, not an independent benchmark. The intended audience is engineers running large-scale inference clusters, particularly those already using or planning disaggregated prefill/decode. If you operate a single node or a small cluster, the complexity of a distributed KV cache pool is likely overkill.

The KVCache-Centric Architecture and Transfer Engine

The core idea is to treat the KV cache as a shared, distributed store rather than a per-GPU private resource. Mooncake comprises a store component and a transfer engine. The store manages KV cache blocks across a pool of nodes, enabling cross-instance sharing and reuse. The transfer engine handles moving data between nodes, with support for RDMA, which is key for low-latency, high-bandwidth transfer. The README highlights integrations where this matters: vLLM's Mooncake Store connector, SGLang's hierarchical KV caching backend, and TensorRT-LLM's cache transmission utilities. The mechanism is visible in the integration points: a connector in the inference engine sends or receives KV cache data via the transfer engine, while the store acts as a central coordinator. This is not a simple sharding scheme; it is a disaggregated design where the cache is a separate tier from compute. The architecture is described in a FAST25 paper, which is a good source for the detailed data flow, but the README alone gives enough to understand the high-level pattern.

Getting It Running: Installation and Configuration

The README points to several concrete artifacts. The transfer engine is available on PyPI as mooncake-transfer-engine, with variants for different hardware: mooncake-transfer-engine-cuda13, non-cuda, npu, musa, efa, and rocm. That suggests installation is as simple as pip installing the appropriate package for your accelerator. There is also a Docker image at kvcacheai/mooncake. The documentation lives at https://kvcache-ai.github.io/Mooncake/, which is the authoritative source for configuration. The README mentions integration with vLLM via a MooncakeStoreConnector and a MooncakeTransferEngineConnector, and with SGLang via a hierarchical KV caching backend. To run Mooncake, you would likely start the store service, then configure your inference engine to use the connector, specifying the store's address and the transfer engine's RDMA settings. Consult the docs for the exact configuration keys. The existence of multiple PyPI packages indicates that hardware support is a first-class concern, not an afterthought.

Integrations and Ecosystem Reach

Mooncake's value is amplified by its integrations. The README lists vLLM, SGLang, TensorRT-LLM, and even PyTorch Ecosystem membership. vLLM officially features Mooncake Store, and SGLang supports it as a hierarchical caching backend. These integrations mean you do not have to build your own connector; you can use existing hooks. For example, vLLM has a Mooncake connector for PD-disaggregated setups, and SGLang uses Mooncake for EPD (Encode-Prefill-Decode) disaggregation. The transfer engine is also used for weight transfer in distributed RL, as seen in SGLang's RDMA-based P2P update, which the README claims achieves 7x faster weight updates for a 1T-parameter model. That claim is from a blog post, not a peer-reviewed paper, but it shows the engine's versatility. The breadth of integrations is a strong signal that the project is not a silo; it is designed to plug into existing serving stacks. However, each integration is a separate code path, and you must verify which version of Mooncake works with your engine version.

Limitations and Failure Modes

Mooncake is not a drop-in solution. It requires a disaggregated serving setup, which is a significant architectural change. If your inference engine does not support a Mooncake connector, you cannot use it without custom development. Check the documentation for how the transfer engine behaves on clusters without RDMA networking such as InfiniBand or RoCE. The project also introduces new operational components: a store and a transfer engine, both of which can fail or become bottlenecks. Check how failure handling and recovery are documented, since a store outage could impact connected inference nodes. Another limitation is the hardware-specific PyPI packages: if you use a niche accelerator, you may find that the non-CUDA variants have less testing or slower updates. The README also notes a 'high-performance version' of the P2P store is open-sourced separately as checkpoint-engine, which suggests the main Mooncake store may have performance trade-offs for certain workloads.

Alternatives and How They Differ

The main alternative is to keep KV caches local to each GPU, as in standard vLLM or SGLang deployments without Mooncake. That approach is simpler but limits cross-request reuse and makes disaggregated prefill/decode harder. Another alternative is FlexKV, a distributed KV store from Tencent and NVIDIA that, according to the README, now supports distributed KV cache reuse with the Mooncake Transfer Engine. FlexKV is a different store implementation but can use Mooncake's transfer engine, so it is not a pure competitor but a complementary option. If you are looking for a non-RDMA approach, you might consider a simpler cache pool like Redis-based caching, but that lacks the zero-copy RDMA transfer that Mooncake provides. The key difference is Mooncake's focus on disaggregation and RDMA; alternatives that do not use RDMA will have higher latency and lower bandwidth for cache transfer. The README also mentions RBG + SGLang HiCache + Mooncake as a cloud-native solution, which is a more elastic deployment model, but it is an integration, not a standalone alternative.

Maintenance and Upgrade Cost

The project is actively maintained, with the latest release v0.3.14-pre-4 published on 2026-11-02, and a history of point releases. The README shows a steady stream of integrations and updates, indicating a fast-moving project. That is a double-edged sword: you get new features, but you also face frequent changes that can break your setup. The PyPI packages are versioned, so you must pin versions to ensure compatibility with your inference engine. The license is Apache-2.0, which is permissive and allows commercial use, but you should review the full license text for any patent or attribution clauses. The project also has a Slack channel for community support, which is useful but not a substitute for documentation. The maintenance cost is non-trivial: you need to track upstream changes, test new releases, and manage the store and transfer engine as part of your infrastructure. If you adopt Mooncake, budget for ongoing operational work, not just initial integration.

Editorial conclusion

Adopt Mooncake if you run large-scale LLM serving with disaggregated prefill/decode or need high-throughput KV cache sharing across nodes, especially with RDMA-capable hardware. Skip it if your workload is single-node or you lack the infrastructure to manage a distributed cache pool. Before adopting, verify the specific integration path for your inference engine (vLLM, SGLang, TensorRT-LLM) and confirm the transfer engine supports your accelerator type (CUDA, NPU, MUSA, ROCm, EFA). Also check the license implications under Apache-2.0 and the operational overhead of running a dedicated store. Mooncake is proven in production at Moonshot AI, but its complexity is justified only when disaggregation is already on your roadmap.

Frequently asked questions

What does Mooncake do in an LLM serving stack?

It is the KVCache-centric serving platform for Kimi, the LLM service provided by Moonshot AI. The repository is C++ and ships a transfer engine for RDMA copies plus a store that keeps KV cache entries other instances can reuse.

Which Mooncake package should I install for my hardware?

The PyPI listings cover mooncake-transfer-engine plus dedicated builds for CUDA 13, non-CUDA, NPU, MUSA, EFA and ROCm. The package metadata requires Python 3.10 or newer and lists Linux with NVIDIA CUDA as its environment.

How does Mooncake plug into vLLM and SGLang?

vLLM v1 takes the transfer engine as a KV Connector in prefill-decode disaggregated setups, and vLLM-Omni supports both MooncakeStoreConnector and MooncakeTransferEngineConnector. SGLang uses it as a hierarchical KV caching storage backend and as the transfer backend for encode-prefill-decode disaggregation.

Is Mooncake only for inference?

No. The update list records it moving hidden states between vLLM inference workers and Speculators trainers through RDMA for online training, and serving as the rollout data-transfer backend in Miles for disaggregated reinforcement learning.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/kvcache-ai-mooncake.svg)](https://hysenlabs.com/projects/kvcache-ai-mooncake)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/kvcache-ai-mooncake.svg)](https://hysenlabs.com/projects/kvcache-ai-mooncake)

Was this useful?