Dynamo supports two transport mechanisms for its request plane (the communication layer between services):
This guide explains how to configure and use request plane in your Dynamo deployment.
The request plane is the transport layer that handles communication between Dynamo services (e.g., frontend to backend, worker to worker). Different request planes offer different trade-offs:
Dynamo has two independent communication planes:
DYN_REQUEST_PLANE): how RPC requests flow between components (frontend → router → worker), via tcp, or nats.Note: If you are using tcp request plane with KV events enabled on the router (the default router-side setting), NATS is automatically initialized. SGLang requires explicit --kv-events-config and TRT-LLM requires --publish-events-and-metrics to publish events. For vLLM, KV events are currently auto-configured when prefix caching is active (deprecated — use --kv-events-config explicitly to prepare for a future release where all backends will default to off). You can optionally configure NATS_SERVER environment variable (e.g., NATS_SERVER=nats://nats-hostname:port) to specify a custom NATS server; otherwise, it defaults to localhost:4222. To disable the router’s KV event listener, use --no-router-kv-events on the frontend.
Because they are independent, you can mix them.
For example, a deployment with TCP request plane can use different KV event planes:
Set the request plane mode using the DYN_REQUEST_PLANE environment variable:
Where <mode> is one of:
tcp (default)natsThe value is case-insensitive.
If DYN_REQUEST_PLANE is not set or contains an invalid value, Dynamo defaults to tcp.
TCP is the default request plane and provides direct, low-latency communication between services.
Configuration:
Note: By default, TCP uses an OS-assigned free port (port 0). This is ideal for environments where multiple services may run on the same machine or when you want to avoid port conflicts. If you need a specific port (e.g., for firewall rules), set DYN_TCP_RPC_PORT explicitly.
When to use TCP:
--no-router-kv-events)TCP Configuration Options:
Additional TCP-specific environment variables:
DYN_TCP_RPC_HOST: Server host address (default: auto-detected)DYN_TCP_RPC_PORT: Server port. If not set, the OS assigns a free port automatically (recommended for most deployments). Set explicitly only if you need a specific port for firewall rules.DYN_TCP_MAX_MESSAGE_SIZE: Maximum message size for TCP client (default: 32MB)DYN_TCP_SHRINK_MESSAGE_SIZE: Threshold for shrinking the zero-copy decoder buffer back to initial size after processing large messages (default: 8MB, max: DYN_TCP_MAX_MESSAGE_SIZE)DYN_TCP_REQUEST_TIMEOUT: Request timeout for TCP client (default: 10 seconds)DYN_TCP_POOL_SIZE: Connection pool size for TCP client (default: 50)DYN_TCP_CONNECT_TIMEOUT: Connect timeout for TCP client (default: 3 seconds)DYN_TCP_CHANNEL_BUFFER: Request channel buffer size for TCP client (default: 100)NATS provides durable jetstream messaging for request plane and can be used for KV events (and router replica sync).
Prerequisites:
When to use NATS:
--no-router-kv-events) provides KV routing without NATS but with reduced accuracy.Limitations:
Here’s a complete example showing how to launch a Dynamo deployment with different request planes:
See examples/backends/vllm/launch/agg_request_planes.sh for a complete working example that demonstrates launching Dynamo with TCP or NATS request planes.
The Dynamo repository includes a complete example demonstrating both request planes:
Location: examples/backends/vllm/launch/agg_request_planes.sh
The request plane implementation is centralized in the Network Manager (lib/runtime/src/pipeline/network/manager.rs), which:
DYN_REQUEST_PLANE environment variable at startupAll request plane implementations conform to common trait interfaces:
RequestPlaneServer: Server-side interface for receiving requestsRequestPlaneClient: Client-side interface for sending requestsThis abstraction means your application code doesn’t need to change when switching request planes.
Request plane configuration is loaded from environment variables at startup and cached globally. The configuration hierarchy is:
DYN_REQUEST_PLANE (defaults to tcp)DYN_TCP_*)DYN_REQUEST_PLANE=tcpDYN_TCP_RPC_HOST). Note: DYN_TCP_RPC_PORT is optional; if not set, an OS-assigned free port is used automatically.After switching request planes, verify your deployment:
Symptoms: Requests timeout or fail to reach the backend
Solutions:
DYN_REQUEST_PLANE settingSymptoms: Service fails to start with configuration error
Solutions:
DYN_REQUEST_PLANE spelling (valid values: nats, tcp)tcpSymptoms: Server fails to start due to “address already in use”
Solutions:
DYN_TCP_RPC_PORT to a specific port and get conflicts, either change the port or remove the setting to use automatic port assignment.--no-router-kv-events)