[Doc] Add llm-d Integration page to the Kubernetes deployment guide#2983
[Doc] Add llm-d Integration page to the Kubernetes deployment guide#2983tpiperatgod wants to merge 2 commits into
Conversation
Document Mooncake's two integration points with llm-d as a link-first reference across three layers (vLLM connector, Mooncake storage, llm-d packaging): - vLLM connector contract — the single-node MooncakeStoreConnector command, the mooncake_config.json mode topology (embedded/standalone-store), and the PYTHONHASHSEED requirement. - KV cache offloading on K8s — deferred to llm-d's Tiered Prefix Cache guide and overlays, with a note on how to verify the Mooncake offload path specifically. - P/D KV transfer — vLLM's runnable MooncakeConnector example, the sidecar flags, and the capability-vs-packaged-path distinction. Pinned to llm-d v0.8.0; field references defer to the upstream vLLM docs, llm-d guide, and Mooncake store guide.
…guide Add the page to the guide's toctree and page list, and broaden the intro so the Store is framed as backing multiple orchestrators (SGLang/RBG and llm-d), not SGLang alone.
There was a problem hiding this comment.
Code Review
This pull request adds a new documentation page detailing the integration of Mooncake with llm-d on Kubernetes, covering the vLLM connector contract, KV cache offloading, and prefill/decode KV transfer. It also updates the main Kubernetes deployment guide to reference this new page. The review feedback suggests standardizing the MyST Markdown syntax by replacing backtick-based directives with colon-based directives for better rendering on GitHub, and standardizing spelling to US English.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| ```{important} | ||
| Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomises its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero. | ||
| ``` |
There was a problem hiding this comment.
Use the colon-based directive syntax (:::{important}) instead of backticks ({important}). In MyST Markdown, colon-based directives are the recommended standard for nesting and block-level elements. Furthermore, GitHub's native Markdown renderer does not recognize backtick-based directives and displays them as raw code blocks, whereas colon-based directives degrade gracefully. This also standardizes the spelling of 'randomises' to 'randomizes' to match the US English spelling used elsewhere in the repository.
| ```{important} | |
| Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomises its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero. | |
| ``` | |
| :::{important} | |
| Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomizes its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero. | |
| ::: |
| ```{note} | ||
| **Upstream sources** (llm-d `v0.8.0`): | ||
| - Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants. | ||
| - Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table. | ||
| - Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up). | ||
| ``` |
There was a problem hiding this comment.
Use the colon-based directive syntax (:::{note}) instead of backticks ({note}) to ensure consistent rendering on GitHub and adhere to MyST Markdown best practices.
| ```{note} | |
| **Upstream sources** (llm-d `v0.8.0`): | |
| - Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants. | |
| - Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table. | |
| - Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up). | |
| ``` | |
| :::{note} | |
| **Upstream sources** (llm-d `v0.8.0`): | |
| - Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants. | |
| - Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table. | |
| - Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up). | |
| ::: |
| ```{note} | ||
| **Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`). | ||
| ``` |
There was a problem hiding this comment.
Use the colon-based directive syntax (:::{note}) instead of backticks ({note}) to ensure consistent rendering on GitHub and adhere to MyST Markdown best practices.
| ```{note} | |
| **Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`). | |
| ``` | |
| :::{note} | |
| **Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`). | |
| ::: |
Description
Adds a new page, llm-d Integration, to the Kubernetes Deployment Guide, documenting how Mooncake integrates with llm-d (vLLM-based serving on Kubernetes).
The content on this page is organized around three main sections:
MooncakeStoreConnectorcommand, themooncake_config.jsonmodetopology (embedded/standalone-store), and thePYTHONHASHSEEDrequirement.MooncakeConnector) — vLLM's runnable example, the routing-sidecar flags, and the distinction between the sidecar capability (present since v0.8.0) and a packaged Mooncake P/D path (reference-only; manifests need manual adaptation).All llm-d references are pinned to v0.8.0. Field references defer to the upstream vLLM docs, the llm-d guide, and the Mooncake Store deployment guide.
Also wires the page into the guide's
index.md(toctree + page list) and broadens the guide intro so the Store is framed as backing multiple orchestrators (SGLang/RBG and llm-d).Two files, ~79 lines added; no existing pages rewritten. The canonical
kv-cache-storage.md/vllm-mooncakestoreconnector.mdpages are untouched.Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Docs-only change; validated by building the Sphinx site and previewing the rendered page.
Test commands:
Test results:
pre-commiton the two changed files:trailing-whitespace,end-of-file-fixer, andcodespellpass; no files rewritten. Themooncake-code-format(clang-format) hook is not applicable to Markdown and did not run here (clang-format-20unavailable in this environment).Checklist
./scripts/code_format.sh— N/A (Markdown only; the script formats C++/Python)pre-commit run --all-filesand all hooks pass — ranpre-commit run --files <changed docs>instead (per docs/AGENTS.md, to avoid unrelated rewrites); docs-relevant hooks pass, see aboveAI Assistance Disclosure
AI tools (Claude Code, Claude Opus) drafted the page and its wording. Facts were verified against upstream sources (vLLM
MooncakeStoreConnector/MooncakeConnectordocs, llm-dv0.8.0guide, overlays, andllm-d-routersidecar source). A separate AI review pass surfaced accuracy issues (e.g., theMultiConnector/sidecar matching rule and the mode-vs-SSD-offload distinction), which were re-checked against upstream and corrected. The human submitter is responsible for understanding and defending every line.