LMCache MP mode - #187
Conversation
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Apply the fixes discovered during live SGLang and vLLM A100 testing: account for shared-memory headroom, strengthen native ABI checks, support current vLLM events and SGLang metrics, and simplify runtime capability handling. Restrict LMCache integrations to the validated ReadWrite role and record Phase 3/4 evidence plus deferred investigations. Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Make typed multiprocess the only LMCache production path, trim legacy API and lifecycle surfaces, preserve managed-provider workload controls, and add upgrade/GPU regression evidence. Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Follow engine scheduling with one same-node server Pod per active node, add typed lifecycle and coverage status, enforce canonical cache domains, and inject runtime-specific NodeLocal connectors. Use UID-scoped shared-memory identities with startup/status verification, retain warm servers during idle windows, and document the completed local and GPU validation. Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Codex reviewFiles reviewed
FindingsBlocking
Should-fix
NitNone. Per-category coverage
Verdictchanges-requested |
Signed-off-by: Yue Sun <fredericsun99@gmail.com>
Codex reviewFiles reviewed
FindingsBlocking
Should-fix
NitNone. Per-category coverage
Verdictchanges-requested |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Yue Sun <yue.s.sun@oracle.com>
Codex reviewFiles reviewed
|
Signed-off-by: Yue Sun <fredericsun99@gmail.com>
Codex reviewFiles reviewed
|
Signed-off-by: Yue Sun <fredericsun99@gmail.com>
Codex reviewFiles reviewed
FindingsBlocking
Should-fix
Nit
Per-category coverage
Verdictchanges-requested |
Signed-off-by: Yue Sun <fredericsun99@gmail.com>
Codex reviewFiles reviewed
FindingsBlocking
Should-fix
NitNone. Per-category coverage
Verdictchanges-requested |
|
I am not addressing the remaining blockers in this PR for two reasons:
Therefore I am not making behavioral changes for these blocking findings in this PR. |
Two operational risks worth resolving before mergeThe core MP mechanism (injection safety, endpoint posture, UID isolation, ownership gate) is genuinely well done and builds/tests clean. Two failure-mode risks stand out — both share one shape: fail-closed and correct on the happy path, but silent on the sad path. Neither needs an architectural change. 🔴 Risk 1 — NodeLocal
|
|
Thanks @EdHasNoLife. These are great findings. For risk1, I've already noticed the problem. Actually, not only the the shared memory leak, but the way the current design uses shared memory without proper tenant and network segregation is kinda risky. I did not address it in this PR because it needs a bigger scope of design and I put it as the first priority for future work here: https://github.com/cachebox-project/inference-cache/blob/lmcache-multiprocess-migration/docs/design/lmcache-multiprocess-migration-roadmap.md#:~:text=objects%20and%20their%20tmpfs%20pages%20can%20remain%20until%20explicit%20node%20cleanup%20or%20reboot For risk2, I understand your concern but this port conflict failure is not silent. The existing implementation already provides several Kubernetes-native signals:
|
Summary
Migrate LMCache integrations from the legacy IP-based data plane to the typed multiprocess data plane.
This PR:
PodLocal: one MP server per engine Pod.NodeLocal: one engine-demanded MP server per active node, shared by matching engines on that node.inferencecache.io/cache-domainmatching to prevent ambiguous CacheBackend ownership.--shm-namevalues to isolate NodeLocal LMCache shared-memory pools.LMCacheConnectorV1,lm://configuration, and LMCacheServer provider path.The migration was validated locally and on SJC dev with vLLM and SGLang TP=1 workloads, including same-node sharing, multi-node placement, L1 store/reset/retrieve, Redis outage/recovery, host-port conflict, ownership/status coverage, UID-scoped shared-memory isolation, and runtime-specific engine metrics.
Linked issues
N/A
Checklist
Vendor-neutral naming (required — see CONTRIBUTING.md)
oci/oracle/*.oci.com/oraclecloud.comin any API group, CRD group, proto package, gRPC service/package, Kubernetes namespace, image registry, Helm chart, or Go module path.pkg/adapters/.../) — never in core controllers, CRD types, the proto contract, or default config.make install-hooksonce, then it runs on every commit).Quality
Signed-off-by:trailer (git commit --signoff).make reuse-lintpasses (SPDX headers and licensing metadata are complete).make buildandmake testpass locally.make lintclean (gofmt + go vet).make manifests generateproduces no drift (generated code committed)..status, CLI, gRPC/HTTP, install bundle/RBAC, samples)? If so, the install-smoke gate asserts it (see CONTRIBUTING.md).Local
make ci, including the pre-push CI gate and race tests, passes. The CI checkbox should be completed after the remote workflow finishes.Contracts (only if touching CRDs or proto)
v1alpha1consumers (engines, gateway clients).proto/changed,docs/design/grpc-contract.mdis updated to match (the pre-commit hook enforces this).api/v1alpha1/*_types.go) or the proto contract changed, the documentation is updated to match — the docs site (site/) and/or the design docs (docs/). CI enforces this (make verify-docs-sync); add theno-docs-neededlabel to waive a genuinely doc-exempt change.