Skip to content

feat: Allow configuring TCP listen backlog#4355

Merged
cratelyn merged 1 commit intolinkerd:mainfrom
relu:configurable-listen-backlog
Mar 24, 2026
Merged

feat: Allow configuring TCP listen backlog#4355
cratelyn merged 1 commit intolinkerd:mainfrom
relu:configurable-listen-backlog

Conversation

@relu
Copy link
Copy Markdown
Contributor

@relu relu commented Dec 17, 2025

This is an attempt to implement the enhancement proposal from linkerd/linkerd2#14801.

I would like to be able to build a proxy image with this patch and test it live. Any help with that would be greatly appreciated.

Full disclosure: I'm not very familiar with Rust, so I've used Claude to generate most of the changes in this patch, including the tests.

@relu relu requested a review from a team as a code owner December 17, 2025 19:49
@cratelyn cratelyn self-requested a review January 8, 2026 18:21
@relu relu force-pushed the configurable-listen-backlog branch from 52f2ca7 to ec496ac Compare March 19, 2026 06:58
Copy link
Copy Markdown
Member

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi there, thanks for opening this, i appreciate your patience.

my main questions are about how to polish the defaults here. we obtain defaults in more than one way, and i'd like if we can clean that up.

there are also some changes here introducing additional trait bounds to impl's that i think might be extraneous.

beyond the scope of this pull request, i also don't have a clear picture of how this would fit together with the proxy injector, which would likely need to be made aware of these changes as well, alongside changes to our helm charts.

I would like to be able to build a proxy image with this patch and test it live. Any help with that would be greatly appreciated.

regarding this, you can use the just docker command to build an image. you can note the image tag, and load that into a cluster. then, you can use the config.linkerd.io/proxy-version annotation on a namespace to use your image.

Comment thread linkerd/app/src/env.rs Outdated
Comment thread linkerd/app/src/env.rs Outdated
Comment thread linkerd/app/src/env/types.rs Outdated
Comment thread linkerd/proxy/transport/src/lib.rs Outdated
Comment thread linkerd/proxy/transport/src/lib.rs Outdated
Comment thread linkerd/proxy/transport/src/listen/dual_bind.rs
Comment thread linkerd/meshtls/tests/util.rs
Comment thread linkerd/app/integration/src/proxy.rs
Comment thread linkerd/proxy/transport/src/listen.rs Outdated
@relu
Copy link
Copy Markdown
Contributor Author

relu commented Mar 19, 2026

regarding this, you can use the just docker command to build an image. you can note the image tag, and load that into a cluster.

Thank you. I was under the impression that it wouldn't build the correct target, as I saw that the actual release image build is a bit more involved. I did manage to build the image that way, so I should be able to test.

@relu relu force-pushed the configurable-listen-backlog branch 2 times, most recently from a75844f to ecfe42a Compare March 20, 2026 12:02
@relu
Copy link
Copy Markdown
Contributor Author

relu commented Mar 20, 2026

I managed to test this successfully. I had to configure the proxy.additionalEnv on the Linkerd Helm release in one of our clusters to configure the LINKERD2_PROXY_INBOUND_TCP_LISTEN_BACKLOG override, and it does indeed work correctly

Before (with default value):

$ ss -talp | grep :4143
LISTEN                            0                                 128                                                                0.0.0.0:4143                                                              0.0.0.0:*

After (set to 1024):

$ ss -talp | grep :4143
LISTEN                            0                                 1024                                                               0.0.0.0:4143                                                              0.0.0.0:*

@cratelyn cratelyn self-requested a review March 20, 2026 14:30
Signed-off-by: Aurel Canciu <aurel.canciu@nexhealth.com>
@relu relu force-pushed the configurable-listen-backlog branch from ecfe42a to cf5132b Compare March 20, 2026 14:53
@cratelyn cratelyn self-assigned this Mar 23, 2026
Copy link
Copy Markdown
Member

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me. thank you very much, @relu!

Comment thread linkerd/proxy/transport/src/listen/dual_bind.rs
Comment thread linkerd/meshtls/tests/util.rs
Comment thread linkerd/app/integration/src/proxy.rs
@cratelyn cratelyn merged commit ff71575 into linkerd:main Mar 24, 2026
14 of 15 checks passed
@relu relu deleted the configurable-listen-backlog branch March 24, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants