Request Transport#
LMCache MP clients select the request transport from the LMCache server URL.
This transport carries control and cache-operation requests; it is separate
from --supported-transfer-mode, which controls how KV data moves between
the engine worker and the LMCache server.
Transport schemes#
Endpoint |
Transport |
Status |
|---|---|---|
|
ZMQ over TCP |
Supported. A URL without a scheme defaults to |
|
ZMQ IPC or in-process |
Recognized by the client factory; the standard LMCache server currently binds ZMQ over TCP. |
|
gRPC |
Supported. |
gRPC implementation and schema development#
The gRPC client and server live under
lmcache/v1/multiprocess/transport/grpc_impl. They expose the same named
RequestClient operations and annotated engine-module handlers as ZMQ, while
protobuf defines the gRPC wire format. Schemas live in the sibling protos
directory, and package builds generate their Python bindings under
_proto_gen.
After changing a schema, regenerate and validate all bindings with:
pip install -r requirements/proto.txt
python -m lmcache.v1.multiprocess.transport.grpc_impl._proto_gen._generate
For a single vLLM connector, set the scheme in lmcache.mp.host and keep the
port in lmcache.mp.port. A ZMQ configuration is:
{
"lmcache.mp.host": "tcp://localhost",
"lmcache.mp.port": 5555
}
To select gRPC, use the same configuration shape with a grpc:// host:
{
"lmcache.mp.host": "grpc://localhost",
"lmcache.mp.port": 5555
}
Start the server with the matching request transport:
lmcache server --transport zmq --host localhost --port 5555
lmcache server --transport grpc --host localhost --port 5555
For multiple servers, specify the scheme on every entry in
lmcache.mp.server_urls, for example
tcp://host1:5555,tcp://host2:5555 or
grpc://host1:5555,grpc://host2:5555. All clients and servers in a
deployment must use matching transports.