Repository navigation
[Feature] remote backend: "{rank}" in remote_url selects a per-worker remote instance - #29
Open
ibrahimnd2000 wants to merge 1 commit into
Open
ibrahimnd2000 wants to merge 1 commit into
ibrahimnd2000 wants to merge 1 commit into
Conversation
… remote instance
`RemoteBackend` now replaces `{rank}` in `remote_url` with the worker's
rank (`metadata.worker_id`, 0 when unset):
Ported from LMCache/LMCache#5548: the in-process engine moved to this
repository in LMCache/LMCache#6254.
Signed-off-by: Muhammad Ibrahim <ibrahimnd2000@gmail.com>
This was referenced Nov 12, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
RemoteBackendnow replaces{rank}inremote_urlwith the worker's rank (metadata.worker_id, 0 when unset):When each worker only reads and writes its own chunks, for example with the sharded PCP store in #5545 (rank r owns
chunk_index % world_size == r), every worker can use its own remote instance with no coordination. Rank r of every engine owns the same chunks, so cross-engine reuse still works. A URL without{rank}is unchanged.Why: a single Valkey instance executes commands on one thread. With 12.4 MB chunks (GLM-5.3 FP8, chunk 256) it served ~0.9 GB/s, with its main thread 73–74% busy on GETs, and a 16k-token L2 hit cost 0.83–0.89 s against 0.32 s to recompute. Measured on one 8×B300 prefill engine (PCP8), replaying a production request stream where ~98% of tokens came from L2:
{rank}URLSpecial notes for your reviewers:
If applicable: