Repository navigation
The egress gateway limits kernel send queues to slow destinations - #3322
Closed
Chuang Wang (chuangw6) wants to merge 1 commit into
Closed
Chuang Wang (chuangw6) wants to merge 1 commit into
Chuang Wang (chuangw6) wants to merge 1 commit into
Conversation
Chuang Wang (chuangw6)
force-pushed
the
sockmem-egress
branch
2 times, most recently
from
October 27, 2026 17:17
3fb4075 to
1dca129
Compare
An upload to a destination that reads slowly can put the tunnel's 1 MiB HTTP/2 stream window into the send queue of the gateway's socket to the destination, charged to the gateway's container. Set TCP_NOTSENT_LOWAT to 16 KiB on the egress listener and on the four dynamic forward proxy clusters, so the backlog stays behind Envoy's buffer limit and the tunnel's flow control. In the Envoy benchmark a stalled tunnel alone on its connection dropped from 1420 to 48 KiB of socket memory, with throughput within run-to-run noise. Fixed buffer sizes are left out: a fixed SO_RCVBUF cut a tunnel's throughput by 90% at 10 ms round trip. Signed-off-by: Chuang Wang <chuangw@google.com>
Chuang Wang (chuangw6)
force-pushed
the
sockmem-egress
branch
from
October 27, 2026 17:21
1dca129 to
db57a7a
Compare
Collaborator
Author
|
Merged into #3320. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3133; design and data in
docs/network-socket-memory.md(#3319).The egress gateway sets
TCP_NOTSENT_LOWATto 16 KiB on itsegresslistener (sockets from atunnel) and on its four forward proxy clusters (sockets to destinations). Without it, an upload to a slow destination can put the tunnel's 1 MiB HTTP/2 window into the socket's send queue. A test checks the listener and every forward proxy cluster keep it. To turn it off, delete those blocks.Download speed at +10 ms is unchanged (309 vs 308 MB/s). Fixed 64 KiB buffers cut it to 10 MB/s, so they are left out.