Envoy provides several built-in network filters that can be used within a listener configuration. While the HTTP connection manager is the most common way to handle application-layer traffic, network filters allow you to intercept and process raw TCP/network traffic.
Common use cases for these filters include:
- Proxying specific protocols: Such as
mysql_proxy_filter, redis_proxy_filter, mongo_proxy_filter, or thrift_proxy_filter. - Security and Access Control: Using
rbac_filter, ext_authz_filter, or tls related filters. - Traffic Management: Using
local_rate_limit_filter, connection_limit_filter, or tcp_bandwidth_limit_filter. - Extensibility: Using
wasm_filter or golang_filter to run custom logic.
Each filter is configured within the network_filters section of a listener's configuration.
/* Example conceptual structure of a listener with a network filter */
listener:
address: ...
filter_chains:
- filters:
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
...