From 019a5e197263e22674f7b9cd84a5dc54a143f9cf Mon Sep 17 00:00:00 2001 From: yaelSchechter <159942322+yaelSchechter@users.noreply.github.com> Date: Tue, 7 May 2024 10:19:42 +0300 Subject: [PATCH] docs: document client idle timeout (#3325) * docs: document client idle timeout Signed-off-by: Yael Shechter * fix pr comments Signed-off-by: Yael Shechter --------- Signed-off-by: Yael Shechter --- .../tasks/traffic/client-traffic-policy.md | 65 +++++++++++++++++++ .../tasks/traffic/client-traffic-policy.md | 65 +++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/site/content/en/latest/tasks/traffic/client-traffic-policy.md b/site/content/en/latest/tasks/traffic/client-traffic-policy.md index 7132453da38..b1782570796 100644 --- a/site/content/en/latest/tasks/traffic/client-traffic-policy.md +++ b/site/content/en/latest/tasks/traffic/client-traffic-policy.md @@ -573,5 +573,70 @@ curl -v http://$GATEWAY_HOST/get \ request timeout ``` +### Configure Client HTTP Idle Timeout + +The idle timeout is defined as the period in which there are no active requests. When the idle timeout is reached the connection will be closed. +For more details see [here](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#envoy-v3-api-field-config-core-v3-httpprotocoloptions-idle-timeout:~:text=...%7D%0A%7D-,idle_timeout,-(Duration)%20The). + +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} + +```shell +cat <}} + +Curl the example app through Envoy proxy: + +```shell +openssl s_client -crlf -connect $GATEWAY_HOST:443 +``` + +You should expect the connection to be closed after 5s. + +You can also check the number of connections closed due to idle timeout by using the following query: + +```shell +envoy_http_downstream_cx_idle_timeout{envoy_http_conn_manager_prefix=""} +``` + +The number of connections closed due to idle timeout should be increased by 1. + + [ClientTrafficPolicy]: ../../../api/extension_types#clienttrafficpolicy [BackendTrafficPolicy]: ../../../api/extension_types#backendtrafficpolicy diff --git a/site/content/en/v1.0.1/tasks/traffic/client-traffic-policy.md b/site/content/en/v1.0.1/tasks/traffic/client-traffic-policy.md index 7b37f8d4338..3e75d98e239 100644 --- a/site/content/en/v1.0.1/tasks/traffic/client-traffic-policy.md +++ b/site/content/en/v1.0.1/tasks/traffic/client-traffic-policy.md @@ -464,5 +464,70 @@ curl -v http://$GATEWAY_HOST/get \ request timeout ``` +### Configure Client HTTP Idle Timeout + +The idle timeout is defined as the period in which there are no active requests. When the idle timeout is reached the connection will be closed. +For more details see [here](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#envoy-v3-api-field-config-core-v3-httpprotocoloptions-idle-timeout:~:text=...%7D%0A%7D-,idle_timeout,-(Duration)%20The). + +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} + +```shell +cat <}} + +Curl the example app through Envoy proxy: + +```shell +openssl s_client -crlf -connect $GATEWAY_HOST:443 +``` + +You should expect the connection to be closed after 5s. + +You can also check the number of connections closed due to idle timeout by using the following query: + +```shell +envoy_http_downstream_cx_idle_timeout{envoy_http_conn_manager_prefix=""} +``` + +The number of connections closed due to idle timeout should be increased by 1. + + [ClientTrafficPolicy]: ../../../api/extension_types#clienttrafficpolicy [BackendTrafficPolicy]: ../../../api/extension_types#backendtrafficpolicy