-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: activate setNoDelay by default #40778
Conversation
There is a failed test already that's related to this change. I think we can just update the test and we are good. |
I flagged this as minor but baking-for-lts. We might decide if we want to backport it or not later. cc @nodejs/tsc |
I have now adapted the tests to take into account that the new default is |
This definitely needs documentation, both in the docs themselves and in the I would definitely recommend not backporting this to LTS versions. |
@addaleax 👍 Any pointers on where/how I can document this? Sorry, first PR to Node core for me |
Is there a reason for changing a default instead of disabling the Nagle's algorithm before a request is made? Wouldn't it be better to call Line 757 in 9cd3089
By doing this, the change would only affect the HTTP/S case and not all created sockets that could be used for something else. |
To make it still be configurable? Also: Is there any case where we want to have this enabled by default? |
I think it's enabled by default on Linux? My point is, if we want to disable it for HTTP, then why changing it for all TCP sockets? |
Right, true, I can look into making a PR that only does it for the |
Fixes #34185
This is kind of a draft and is eg. lacking tests as I don't know how to test this (partly because it interacts deeply with the OS) and the fact that the current setup isn't tested either, so its an extra uphill in creating tests for this tiny change of default.
So, remaining:
I'm opening a PR anyway, so I don't block #34185 and maybe can get some help on how to proceed.