lmcache coordinator#
The lmcache coordinator command launches the LMCache MP coordinator, a
standalone HTTP service that tracks the MP server instances in a deployment. MP
servers register with it and send periodic heartbeats; the coordinator evicts
any instance whose heartbeat lapses past --instance-timeout.
It replaces python -m lmcache.v1.mp_coordinator. The process runs in the
foreground; stop it with Ctrl-C.
lmcache coordinator [options]
Quick start#
lmcache coordinator \
--host 0.0.0.0 --port 9300 \
--instance-timeout 30 \
--health-check-interval 10
Options#
Flag |
Description |
|---|---|
|
Bind address for the coordinator’s HTTP server (default: |
|
HTTP port (default: |
|
Seconds without a heartbeat after which an instance is evicted
(default: |
|
Seconds between health-check sweeps; |
|
Seconds between L2 eviction sweeps; |
|
Fraction of tracked keys (by count) to evict per cycle, |
|
Eviction fires when usage reaches this fraction of the quota, |
|
Tokens per chunk for the global CacheBlend directory; must equal the
LMCache chunk size the blend servers use (default: |
|
Positions between CacheBlend match probes; |
|
Seconds the HTTP server keeps idle connections open before closing
them. Must be greater than the MP servers’ heartbeat interval
(default |
Configuration#
Every flag is optional. Unset flags fall back to the
LMCACHE_MP_COORDINATOR_* environment variables (HOST, PORT,
INSTANCE_TIMEOUT, HEALTH_CHECK_INTERVAL, EVICTION_CHECK_INTERVAL,
EVICTION_RATIO, TRIGGER_WATERMARK, BLEND_CHUNK_SIZE,
BLEND_PROBE_STRIDE, TIMEOUT_KEEP_ALIVE), and then to the built-in
defaults. A supplied flag always overrides the matching env-derived value, so
env-only deployments keep working unchanged.
A second set of env-only knobs controls the startup L2 resync —
LMCACHE_MP_COORDINATOR_ENABLE_STARTUP_RESYNC (default True),
LMCACHE_MP_COORDINATOR_RESYNC_POLL_INTERVAL (1),
LMCACHE_MP_COORDINATOR_RESYNC_MAX_WAIT (60), and
LMCACHE_MP_COORDINATOR_RESYNC_PAGE_SIZE (1000). See
Multi-Server Coordination for the boot-time resync flow and the active
eviction loop.
The coordinator drives fleet-wide L2 eviction by calling each MP
server’s DELETE /l2 endpoint, and resync paginates GET /l2/keys
on a registered MP server. Both endpoints are documented at
L2 Storage Management.
See Multi-Server Coordination for the coordinator’s architecture, registration protocol, and HTTP API.