Description:
We have set idleTimeout: 75s in the envoy lister config and like to set the response header Keep-Alive: timeout=70 via response_headers_to_add so that clients know when to close connections.
Currently the header get's delete by envoy again. I think the relevant code is here:
|
request_headers.removeKeepAlive(); |
Why?
We have a lot of Java apps that use the Apache HTTPClient (HTTP/1.1) and don't have a http keep-alive timeout configured and also don't check if connections are still active (default config of the client). This leads to NoHttpResponseExceptions in the apps when evnoy closes the connection after the idleTimeout.
If we can set the Keep-Alive header the errors should be reduced as the HTTPClient honors the timeout from that header. See Apache HTTPClient doc: 2.6. Connection keep alive strategy
We use envoy via Istio but that shouldn't make a difference.
Related to: #3011
Problems setting Connection headers on cluster responses: https://groups.google.com/g/envoy-users/c/Gop0a7S-vN0/m/eqvvRCKxBgAJ
Description:
We have set
idleTimeout: 75sin the envoy lister config and like to set the response headerKeep-Alive: timeout=70viaresponse_headers_to_addso that clients know when to close connections.Currently the header get's delete by envoy again. I think the relevant code is here:
envoy/source/common/http/conn_manager_utility.cc
Line 77 in cbd8d57
Why?
We have a lot of Java apps that use the Apache HTTPClient (HTTP/1.1) and don't have a http keep-alive timeout configured and also don't check if connections are still active (default config of the client). This leads to NoHttpResponseExceptions in the apps when evnoy closes the connection after the
idleTimeout.If we can set the Keep-Alive header the errors should be reduced as the HTTPClient honors the timeout from that header. See Apache HTTPClient doc: 2.6. Connection keep alive strategy
We use envoy via Istio but that shouldn't make a difference.
Related to: #3011
Problems setting Connection headers on cluster responses: https://groups.google.com/g/envoy-users/c/Gop0a7S-vN0/m/eqvvRCKxBgAJ