The Dynamo KV Router intelligently routes requests by evaluating their computational costs across different workers. It considers both decoding costs (from active blocks) and prefill costs (from newly computed blocks), using KV cache overlap to minimize redundant computation. Optimizing the KV Router is critical for achieving maximum throughput and minimum latency in distributed inference setups.
To launch the Dynamo frontend with the KV Router:
For Kubernetes, set DYN_ROUTER_MODE=kv on the Frontend service. Workers automatically report KV cache events — no worker-side configuration changes needed.
You can also run the KV router as a standalone service (without the Dynamo frontend). See the Standalone Router component for more details.
For all CLI arguments, environment variables, K8s deployment examples, and tuning guidelines, see the Router Guide. For A/B benchmarking, see the KV Router A/B Benchmarking Guide.
Requirements:
register_model() with model_input=ModelInput.Tokens. Your backend handler receives pre-tokenized requests with token_ids instead of raw text.register_model() with model_input=ModelInput.Tokens (see Backend Guide)--static-endpoint mode with KV routing (use dynamic discovery instead)Multimodal Support:
Limitations:
For basic model registration without KV routing, use --router-mode round-robin or --router-mode random with both static and dynamic endpoints.