KV routing validation and protocol comparison
Two-prefill, two-decode deployment
Section titled “Two-prefill, two-decode deployment”On October 21, 2026, the service project tested cache-aware routing with a six-layer view of GLM-5.3 W8A8 on four ARM64 Ascend A3 devices. Two Prefill and two Decode instances used native RPC, with one device per instance and TP=1, DP=1. Service discovered the two Prefill publishers through etcd and subscribed to their ZeroMQ endpoints.
Twenty requests exercised three observable behaviors.
- After warming prefix A on the first Prefill instance and B on the second, eight alternating requests returned to the corresponding instance. The engine’s hit counter increased by 384 tokens per request, and the client reported
prompt_tokens_details.cached_tokens=384. - Nine distinct prefixes put the first prefix under eviction pressure. Its directory entry moved from Device to Host-only residency with 384 cached tokens. The next request selected the same Prefill instance, reused those tokens and restored Device residency.
- Both Decode instances recorded generated tokens.
The run used max_cache_size=16777216, host_blocks_factor=4, max_seqs_per_batch=1, max_tokens_per_batch=512 and num_speculative_tokens=0, with the Python model and ACL Graph enabled. The six-layer configuration referenced the original 12 weight shards via symlinks. At readiness, the devices reported 37051–37381 MiB of HBM each, including approximately 3 GiB already in use. These observations cover prefix reuse and routing for this configuration.
Comparing event protocols
Section titled “Comparing event protocols”| Component | Discovery and indexing | Recovery |
|---|---|---|
| xLLM Service | The service watches registered instances and keeps a Device/Host prefix index per instance and DP rank. CAR queries it in process. | The engine replay endpoint returns a full snapshot at a sequence watermark. Service buffers live deltas while recovering. |
Motor KVConductor at 8de05c7 | The Python coordinator registers endpoints with a Rust index that tracks HBM prefixes and CPU/disk suffixes. | The replay client recognizes an empty delimiter, sequence, payload and an end marker. The live receive loop at this revision consumes payloads directly. |
llm-d-router at ee50ad2 | The EPP plugin supports global endpoints and per-instance discovery. Its index maps request and engine keys to endpoint and device tier. | History replay and snapshot requests use distinct endpoints. A snapshot reply carries a watermark, publisher identity and event batches. |
Compare the pinned implementations when integrating another publisher. Motor documents these paths in its configuration, registration client, subscriber and index. For llm-d, see the pool configuration, endpoint lifecycle, subscriber and cache index.