From e71e8804c343bc9e3fcd28abd9f4868ab8c437b5 Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 27 Feb 2024 15:40:35 +0800 Subject: [PATCH] docs: Timeouts in CTP Signed-off-by: zirain --- .../en/latest/user/client-traffic-policy.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/site/content/en/latest/user/client-traffic-policy.md b/site/content/en/latest/user/client-traffic-policy.md index b155eaf48692..4bf05f15065b 100644 --- a/site/content/en/latest/user/client-traffic-policy.md +++ b/site/content/en/latest/user/client-traffic-policy.md @@ -410,5 +410,58 @@ Handling connection for 8888 } ``` +### Enable HTTP request timeout + +This example configures the HTTP request timeout for the client, please check out the details [here](https://www.envoyproxy.io/docs/envoy/latest/faq/configuration/timeouts#stream-timeouts). + +```shell +cat < GET /get HTTP/1.1 +> Host: www.example.com +> User-Agent: curl/8.4.0 +> Accept: */* +> Content-Length: 10000 +> +< HTTP/1.1 408 Request Timeout +< content-length: 15 +< content-type: text/plain +< date: Tue, 27 Feb 2024 07:38:27 GMT +< connection: close +< +* Closing connection +request timeout +``` + [ClientTrafficPolicy]: ../../api/extension_types#clienttrafficpolicy [BackendTrafficPolicy]: ../../api/extension_types#backendtrafficpolicy