TCP proxy

Dynamic cluster selection

The upstream cluster used by the TCP proxy filter can be dynamically set by other network filters on a per-connection basis by setting a per-connection state object under the key envoy.tcp_proxy.cluster. See the implementation for the details.

Statistics

The TCP proxy filter emits both its own downstream statistics as well as many of the cluster upstream statistics where applicable. The downstream statistics are rooted at tcp.. with the following statistics:

NameTypeDescription
downstream_cx_totalCounterTotal number of connections handled by the filter
downstream_cx_no_routeCounterNumber of connections for which no matching route was found or the cluster for the route was not found
downstream_cx_tx_bytes_totalCounterTotal bytes written to the downstream connection
downstream_cx_tx_bytes_bufferedGaugeTotal bytes currently buffered to the downstream connection
downstream_cx_rx_bytes_totalCounterTotal bytes read from the downstream connection
downstream_cx_rx_bytes_bufferedGaugeTotal bytes currently buffered from the downstream connection
downstream_flow_control_paused_reading_totalCounterTotal number of times flow control paused reading from downstream
downstream_flow_control_resumed_reading_totalCounterTotal number of times flow control resumed reading from downstream
idle_timeoutCounterTotal number of connections closed due to idle timeout
upstream_flush_totalCounterTotal number of connections that continued to flush upstream data after the downstream connection was closed
upstream_flush_activeGaugeTotal connections currently continuing to flush upstream data after the downstream connection was closed