docs/root/configuration/best_practices/edge.rst
.. _best_practices_edge:
Envoy is a production-ready edge proxy, however, the default settings are tailored for the service mesh use case, and some values need to be adjusted when using Envoy as an edge proxy.
TCP proxies should configure:
overload_manager <config_overload_manager>,listener buffer limits <envoy_v3_api_field_config.listener.v3.Listener.per_connection_buffer_limit_bytes> to 32 KiB,cluster buffer limits <envoy_v3_api_field_config.cluster.v3.Cluster.per_connection_buffer_limit_bytes> to 32 KiB.HTTP proxies should additionally configure:
use_remote_address <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>
to true (to avoid consuming HTTP headers from external clients, see :ref:HTTP header sanitizing <config_http_conn_man_header_sanitizing>
for details),connection and stream timeouts <faq_configuration_timeouts>,HTTP/2 maximum concurrent streams limit <envoy_v3_api_field_config.core.v3.Http2ProtocolOptions.max_concurrent_streams> and :ref:HTTP/3 maximum concurrent streams limit <envoy_v3_api_field_config.core.v3.QuicProtocolOptions.max_concurrent_streams> to 100HTTP/2 initial stream window size limit <envoy_v3_api_field_config.core.v3.Http2ProtocolOptions.initial_stream_window_size> to 64 KiB,HTTP/2 initial connection window size limit <envoy_v3_api_field_config.core.v3.Http2ProtocolOptions.initial_connection_window_size> to 1 MiB.headers_with_underscores_action setting <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.headers_with_underscores_action> to REJECT_REQUEST, to protect upstream services that treat '_' and '-' as interchangeable.Listener connection limits. <config_listeners_runtime>Global downstream connection limits <config_overload_manager>.If Envoy is configured with RBAC filter or makes route selection based on URL path it is recommended to enable the following path normalization options to minimize probability of path confusion vulnerabilities. Path confusion vulnerabilities occur when parties participating in request use different path representations.
normalize_path setting <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path>.merge_slashes setting <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.merge_slashes>.Additionally the :ref:path_with_escaped_slashes_action setting <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_with_escaped_slashes_action> should be set according to following recommendations:
RFC 3986 <https://www.ietf.org/rfc/rfc3986.txt>_ compliant normalized paths (i.e. gRPC clients).RFC 3986 <https://www.ietf.org/rfc/rfc3986.txt>_ compliant and require encoded slashes.The following is a YAML example of the above recommendation (taken from the :ref:Google VRP <arch_overview_google_vrp> edge server configuration):
.. literalinclude:: _include/edge.yaml :language: yaml