Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/protodoc_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,40 @@ fields:
threshold:
value: 0.95
envoy.config.cluster.v3.Cluster.per_connection_buffer_limit_bytes:
edge_config: { example: 32768 }
edge_config: {example: 32768}
envoy.config.cluster.v3.Cluster.http2_protocol_options:
edge_config:
example:
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
envoy.config.listener.v3.Listener.per_connection_buffer_limit_bytes:
edge_config: { example: 32768 }
edge_config: {example: 32768}
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:
edge_config:
example:
idle_timeout: 900s # 15 mins
idle_timeout: 900s # 15 mins
headers_with_underscores_action: REJECT_REQUEST
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:
edge_config:
example:
max_concurrent_streams: 100
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:
edge_config:
example: 300s # 5 mins
example: 300s # 5 mins
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:
edge_config:
example: 10s # 10 seconds
example: 10s # 10 seconds
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:
edge_config:
note: >
This timeout is not compatible with streaming requests.
example: 300s # 5 mins
example: 300s # 5 mins
envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:
edge_config: { example: true }
edge_config: {example: true}
envoy.config.listener.v3.QuicProtocolOptions.quic_protocol_options:
edge_config:
example:
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 65536 # 64 KiB
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 65536 # 64 KiB
58 changes: 29 additions & 29 deletions docs/root/configuration/best_practices/_include/edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ overload_manager:
typed_config:
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
# TODO: Tune for your system.
max_heap_size_bytes: 2147483648 # 2 GiB
max_heap_size_bytes: 2147483648 # 2 GiB
actions:
- name: "envoy.overload_actions.shrink_heap"
triggers:
Expand Down Expand Up @@ -37,7 +37,7 @@ static_resources:
# - name: envoy.filters.listener.proxy_protocol
# typed_config:
# "@type": type.googleapis.com/envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol
per_connection_buffer_limit_bytes: 32768 # 32 KiB
per_connection_buffer_limit_bytes: 32768 # 32 KiB
filter_chains:
- filter_chain_match:
server_names: ["example.com", "www.example.com"]
Expand All @@ -47,8 +47,8 @@ static_resources:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
common_tls_context:
tls_certificates:
- certificate_chain: { filename: "certs/servercert.pem" }
private_key: { filename: "certs/serverkey.pem" }
- certificate_chain: {filename: "certs/servercert.pem"}
private_key: {filename: "certs/serverkey.pem"}
filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
Expand All @@ -59,51 +59,51 @@ static_resources:
merge_slashes: true
path_with_escaped_slashes_action: UNESCAPE_AND_REDIRECT
common_http_protocol_options:
idle_timeout: 3600s # 1 hour
idle_timeout: 3600s # 1 hour
headers_with_underscores_action: REJECT_REQUEST
http2_protocol_options:
max_concurrent_streams: 100
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
stream_idle_timeout: 300s # 5 mins, must be disabled for long-lived and streaming requests
request_timeout: 300s # 5 mins, must be disabled for long-lived and streaming requests
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
stream_idle_timeout: 300s # 5 mins, must be disabled for long-lived and streaming requests
request_timeout: 300s # 5 mins, must be disabled for long-lived and streaming requests
route_config:
virtual_hosts:
- name: default
domains: ["*"]
routes:
- match: { prefix: "/" }
- match: {prefix: "/"}
route:
cluster: service_foo
idle_timeout: 15s # must be disabled for long-lived and streaming requests
idle_timeout: 15s # must be disabled for long-lived and streaming requests
clusters:
- name: service_foo
per_connection_buffer_limit_bytes: 32768 # 32 KiB
per_connection_buffer_limit_bytes: 32768 # 32 KiB
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options:
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB
initial_stream_window_size: 65536 # 64 KiB
initial_connection_window_size: 1048576 # 1 MiB

layered_runtime:
layers:
- name: static_layer_0
static_layer:
envoy:
resource_limits:
listener:
example_listener_name:
connection_limit: 10000
overload:
global_downstream_max_connections: 50000
- name: static_layer_0
static_layer:
envoy:
resource_limits:
listener:
example_listener_name:
connection_limit: 10000
overload:
global_downstream_max_connections: 50000
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 443
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
"@type": type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
http_filters:
- name: envoy.filters.http.router
route_config:
virtual_hosts:
- name: default
domains: ["*"]
routes:
- match: { prefix: "/" }
route:
cluster: service_foo
- address:
socket_address:
address: 0.0.0.0
port_value: 443
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
"@type": type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
http_filters:
- name: envoy.filters.http.router
route_config:
virtual_hosts:
- name: default
domains: ["*"]
routes:
- match: {prefix: "/"}
route:
cluster: service_foo
clusters:
- name: service_foo
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
"@type": type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080
- name: service_foo
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
"@type": type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ static_resources:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/path/with/bandwidth/limit" }
route: { cluster: service_protected_by_bandwidth_limit }
- match: {prefix: "/path/with/bandwidth/limit"}
route: {cluster: service_protected_by_bandwidth_limit}
typed_per_filter_config:
envoy.filters.http.bandwidth_limit:
"@type": type.googleapis.com/envoy.extensions.filters.http.bandwidth_limit.v3alpha.BandwidthLimit
stat_prefix: bandwidth_limiter_custom_route
enable_mode: REQUEST_AND_RESPONSE
limit_kbps: 500
fill_interval: 0.1s
- match: { prefix: "/" }
route: { cluster: web_service }
- match: {prefix: "/"}
route: {cluster: web_service}
http_filters:
- name: envoy.filters.http.bandwidth_limit
typed_config:
Expand Down
23 changes: 12 additions & 11 deletions docs/root/configuration/http/http_filters/_include/composite.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
socket_address: {address: 0.0.0.0, port_value: 9901}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi this is the additional space that means +/- lines dont match

static_resources:
listeners:
- name: listener1
address:
socket_address: { address: 0.0.0.0, port_value: 51051 }
socket_address: {address: 0.0.0.0, port_value: 51051}
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
Expand All @@ -22,8 +23,8 @@ static_resources:
routes:
# NOTE: by default, matching happens based on the gRPC route, and not on the incoming request path.
# Reference: https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/grpc_json_transcoder_filter#route-configs-for-transcoded-requests
- match: { prefix: "/helloworld.Greeter" }
route: { cluster: grpc, timeout: 60s }
- match: {prefix: "/helloworld.Greeter"}
route: {cluster: grpc, timeout: 60s}
http_filters:
- name: composite
typed_config:
Expand All @@ -41,7 +42,7 @@ static_resources:
header_name: x-fault-category
exact_match_map:
map:
"huge fault": # inject 10s latency into all requests
"huge fault": # inject 10s latency into all requests
action:
name: composite-action
typed_config:
Expand All @@ -55,7 +56,7 @@ static_resources:
percentage:
numerator: 100
denominator: HUNDRED
"tiny fault": # inject 1s latency into all requests
"tiny fault": # inject 1s latency into all requests
action:
name: composite-action
typed_config:
Expand Down Expand Up @@ -93,8 +94,8 @@ static_resources:

layered_runtime:
layers:
- name: static-layer
static_layer:
envoy:
reloadable_features:
experimental_matching_api: true
- name: static-layer
static_layer:
envoy:
reloadable_features:
experimental_matching_api: true
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ static_resources:
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 4630
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 4630
- name: grpc
type: STRICT_DNS
lb_policy: ROUND_ROBIN
Expand All @@ -76,9 +76,9 @@ static_resources:
load_assignment:
cluster_name: grpc
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 10005
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 10005
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
admin:
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
socket_address: {address: 0.0.0.0, port_value: 9901}

static_resources:
listeners:
- name: listener1
address:
socket_address: { address: 0.0.0.0, port_value: 51051 }
socket_address: {address: 0.0.0.0, port_value: 51051}
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
Expand All @@ -22,8 +22,8 @@ static_resources:
routes:
# NOTE: by default, matching happens based on the gRPC route, and not on the incoming request path.
# Reference: https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/grpc_json_transcoder_filter#route-configs-for-transcoded-requests
- match: { prefix: "/helloworld.Greeter" }
route: { cluster: grpc, timeout: 60s }
- match: {prefix: "/helloworld.Greeter"}
route: {cluster: grpc, timeout: 60s}
http_filters:
- name: envoy.filters.http.grpc_json_transcoder
typed_config:
Expand Down
Loading