Skip to content
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

Add TCP_NODELAY #17

Closed
denyaalt opened this issue Mar 17, 2024 · 5 comments
Closed

Add TCP_NODELAY #17

denyaalt opened this issue Mar 17, 2024 · 5 comments

Comments

@denyaalt
Copy link

Hi,
Is it possible to add the TCP_NODELAY setting to SO_REUSEPORT to use them together?
Thanks.

@jokester
Copy link
Owner

Hi @denyaalt . I didn't have a plan by far, because I don't know what it does.

Can you brief me about, in what case and why would people want it?

@denyaalt
Copy link
Author

TCP_NODELAY disables the Nagle algorithm (disables buffering and delays), which allows data to be sent as quickly as possible.

@jokester
Copy link
Owner

@denyaalt Thanks for the explanation, didn't know that.

I did a research about TCP_NODELAY in nodejs. Maybe node.js already have that option around v18 as default in socket and http servers, via PR.

Sorry but can you check that too? (If node.js already have that capability I tend to not do it again)

@denyaalt
Copy link
Author

denyaalt commented Apr 1, 2024

Yes, this option is available in Node.js when we directly open a TCP socket, I'm not sure if it will work after your wrapper.
My colleague reported that when opening SO_REUSEPORT sockets from systemd, the TCP_NODELAY option does not work from Node.js, the user needs to additionally set the TCP_NODELAY flag in systemd.

@jokester
Copy link
Owner

jokester commented Apr 1, 2024

@denyaalt that sounds more like a bug in node.js (unlike SO_REUSEPORT they decided to not support) 🤔

Or, you are welcome to fork this repo and create a local build with TCP_NODELAY and see if it helps in your situation.

@jokester jokester closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
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

No branches or pull requests

2 participants