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
I have looked for existing issues (including closed) about this
Feature Request
Motivation
Currently axum does not set tcp-nodelay on accepted connections.
As demonstrated in this issue: hyperium/hyper#3269 this default behaviour can heavily degrade performance in some use cases.
Proposal
Add some way to set TCP_NODELAY on the accepted connections (via TcpStream::set_nodelay).
Variants
Make it the default behaviour for axum::serve by just setting it on each accepted connection
Add a function to axum::serve::Serve<> (like graceful_shutdown) of which the usage could look something like this:
axum::serve(...).set_nodelay(true).await
Some Notes/Questions
As far as I understood you want to keep this part of axum relatively simple and prefer to refer to hyper-util for more complex tasks. However, this would be a relatively small change (I can create a PR if you want) so it doesn't add much code complexity and can give huge performance boosts.
So I guess questions:
Do you want this at all?
If you do: What would you like for an interface?
The text was updated successfully, but these errors were encountered:
#2479 is going to let you set settings for the accepted connections before handing them over. However it's a breaking change so unfortunately you will need to wait for 0.8.
Feature Request
Motivation
Currently
axum
does not set tcp-nodelay on accepted connections.As demonstrated in this issue: hyperium/hyper#3269 this default behaviour can heavily degrade performance in some use cases.
Proposal
Add some way to set
TCP_NODELAY
on the accepted connections (viaTcpStream::set_nodelay
).Variants
axum::serve
by just setting it on each accepted connectionaxum::serve::Serve<>
(likegraceful_shutdown
) of which the usage could look something like this:Some Notes/Questions
As far as I understood you want to keep this part of
axum
relatively simple and prefer to refer tohyper-util
for more complex tasks. However, this would be a relatively small change (I can create a PR if you want) so it doesn't add much code complexity and can give huge performance boosts.So I guess questions:
The text was updated successfully, but these errors were encountered: