**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:**
**When to use TCP:**
- Simple deployments with direct service-to-service communication (e.g. frontend to backend)
- Simple deployments with direct service-to-service communication (e.g. frontend to backend)
- Minimal infrastructure requirements (no NATS needed)
- Minimal infrastructure requirements (no NATS needed)
-`DYN_TCP_RPC_HOST`: Server host address (default: auto-detected)
-`DYN_TCP_RPC_HOST`: Server host address (default: auto-detected)
-`DYN_TCP_RPC_PORT`: Server port (default: 9999)
-`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_MAX_MESSAGE_SIZE`: Maximum message size for TCP client (default: 32MB)
-`DYN_TCP_REQUEST_TIMEOUT`: Request timeout for TCP client (default: 10 seconds)
-`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_POOL_SIZE`: Connection pool size for TCP client (default: 50)
...
@@ -228,7 +230,7 @@ Request plane configuration is loaded from environment variables at startup and
...
@@ -228,7 +230,7 @@ Request plane configuration is loaded from environment variables at startup and
1. Stop your Dynamo services
1. Stop your Dynamo services
2. Set environment variable `DYN_REQUEST_PLANE=tcp`
2. Set environment variable `DYN_REQUEST_PLANE=tcp`
3. Optionally configure TCP-specific settings (e.g., `DYN_TCP_RPC_HOST`). Note: `DYN_TCP_RPC_PORT` is optional; if not set, an OS-assigned free port is used automatically.
- TCP: By default, TCP uses an OS-assigned free port, so port conflicts should be rare. If you explicitly set `DYN_TCP_RPC_PORT` to a specific port and get conflicts, either change the port or remove the setting to use automatic port assignment.