TCP Proxy

TCP Proxy configuration overview.

[ proto]

  "stat_prefix": "...",
  "cluster": "...",
  "weighted_clusters": "{...}",
  "metadata_match": "{...}",
  "idle_timeout": "{...}",
  "access_log": [],
  "max_connect_attempts": "{...}"

(string, REQUIRED) The prefix to use when emitting statistics.


(string) The upstream cluster to connect to.

Precisely one of cluster, weighted_clusters must be set.


( Multiple upstream clusters can be specified for a given route. The request is routed to one of the upstream clusters based on weights assigned to each cluster.

Precisely one of cluster, weighted_clusters must be set.


(core.Metadata) Optional endpoint metadata match criteria. Only endpoints in the upstream cluster with metadata matching that set in metadata_match will be considered. The filter name should be specified as


(Duration) The idle timeout for connections managed by the TCP proxy filter. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.


Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP FIN packets, etc.


(config.filter.accesslog.v2.AccessLog) Configuration for access logs emitted by the this tcp_proxy.


(UInt32Value) The maximum number of unsuccessful connection attempts that will be made before giving up. If the parameter is not specified, 1 connection attempt will be made.

[ proto]

Allows for specification of multiple upstream clusters along with weights that indicate the percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster based on these weights.

  "clusters": []

(, REQUIRED) Specifies one or more upstream clusters associated with the route.

[ proto]

  "name": "...",
  "weight": "..."

(string, REQUIRED) Name of the upstream cluster.


(uint32) When a request matches the route, the choice of an upstream cluster is determined by its weight. The sum of weights across all entries in the clusters array determines the total weight.