.. _envoy_api_file_envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto: TCP Proxy ========= TCP Proxy :ref:`configuration overview `. .. _envoy_api_msg_config.filter.network.tcp_proxy.v2.TcpProxy: config.filter.network.tcp_proxy.v2.TcpProxy ------------------------------------------- `[config.filter.network.tcp_proxy.v2.TcpProxy proto] `_ .. code-block:: json { "stat_prefix": "...", "cluster": "...", "weighted_clusters": "{...}", "metadata_match": "{...}", "idle_timeout": "{...}", "access_log": [], "max_connect_attempts": "{...}" } .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.stat_prefix: stat_prefix (`string `_, *REQUIRED*) The prefix to use when emitting :ref:`statistics `. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.cluster: cluster (`string `_) The upstream cluster to connect to. Precisely one of :ref:`cluster `, :ref:`weighted_clusters ` must be set. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.weighted_clusters: weighted_clusters (:ref:`config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster `) 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 :ref:`cluster `, :ref:`weighted_clusters ` must be set. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.metadata_match: metadata_match (:ref:`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 *envoy.lb*. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.idle_timeout: idle_timeout (`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, connections will never be closed by the TCP proxy due to being idle. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.access_log: access_log (:ref:`config.filter.accesslog.v2.AccessLog `) Configuration for :ref:`access logs ` emitted by the this tcp_proxy. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.max_connect_attempts: max_connect_attempts (`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. .. _envoy_api_msg_config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster: config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster ----------------------------------------------------------- `[config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster 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. .. code-block:: json { "clusters": [] } .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.clusters: clusters (:ref:`config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight `, *REQUIRED*) Specifies one or more upstream clusters associated with the route. .. _envoy_api_msg_config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight: config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight ------------------------------------------------------------------------- `[config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight proto] `_ .. code-block:: json { "name": "...", "weight": "..." } .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight.name: name (`string `_, *REQUIRED*) Name of the upstream cluster. .. _envoy_api_field_config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight.weight: weight (`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.