You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Envoy should not fire stream idle timer when it's active.
Repro steps:
create a listener with stream_idle_timeout set to 60s
a client with a low bandwidth network download a file through Envoy proxy, curl -v -k --limit-rate 1 https://localhost:7443/2MB.txt -o 2MB.txt
after about 65 seconds, envoy close the connection and output an access log with an SI flag in it: [2024-05-09T03:15:14.949Z] "GET /2MB.txt HTTP/1.1" 200 SI 0 835584 60020 2 "172.16.120.74" "curl/8.6.0" "bc69c5d5-e27e-4809-aac4-420acaae5b47" "localhost:7443" "127.0.0.1:8080"
[2024-05-09 11:15:14.963][11636530][debug][http] [source/common/http/conn_manager_impl.cc:1939] [Tags: "ConnectionId":"0","StreamId" :"13380574157739000950"] Disabling upstream stream due to downstream stream watermark.
For a slow downstream, stream buffer's watermark is high and it takes a long time to recover to low. During this time client is downloading slowly but Envoy won't receive from upstream and won't reset its idle timer.
In my case the client is an IoT device with a 4kbps bandwidth. Envoy's per_connection_buffer_limit_bytes is set to 32 KB. So it takes 32 seconds (32KB / 2 / (4kbps / 8)) to return to low watermark. But if the connection buffer is higher it may take much more time.
The issue can be mitigated by either increasing the stream_idle_timeout or decreasing the per_connection_buffer_limit_bytes, if applicable to the use case.
I think we could add a config option for not making progress when backed up. I'm not sure we'd want it on by default but we could also runtime guard and add a knob if folks prefer the old behavior
Description:
Envoy should not fire stream idle timer when it's active.
Repro steps:
stream_idle_timeout
set to60s
curl -v -k --limit-rate 1 https://localhost:7443/2MB.txt -o 2MB.txt
SI
flag in it:[2024-05-09T03:15:14.949Z] "GET /2MB.txt HTTP/1.1" 200 SI 0 835584 60020 2 "172.16.120.74" "curl/8.6.0" "bc69c5d5-e27e-4809-aac4-420acaae5b47" "localhost:7443" "127.0.0.1:8080"
Admin and Stats Output:
Config:
Logs:
The text was updated successfully, but these errors were encountered: