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

Make it easy to set TCP_NODELAY and TCP_QUICKACK on client sockets #1124

Closed
chelyabinsk opened this issue Nov 11, 2023 · 0 comments · Fixed by #1177
Closed

Make it easy to set TCP_NODELAY and TCP_QUICKACK on client sockets #1124

chelyabinsk opened this issue Nov 11, 2023 · 0 comments · Fixed by #1177

Comments

@chelyabinsk
Copy link

chelyabinsk commented Nov 11, 2023

Similar to this PR. I compared latency times in Python WebSockets vs this package and I found that while Python latency essentially equaled my ping to the server, Julia took nearly twice as long.

I did some digging and I found that I can match the times by doing the following

HTTP.WebSockets.open("wss://localhost") do ws
  Sockets.nagle(ws.io.io.io, false)
  Sockets.quickack(ws.io.io.io, true)
end

I propose 4 options

  1. Make this behaviour more explicit in the documentation
  2. I find ws.io.io.io path quite funky, and maybe it will be possible to make it more easily accessible from ws object.
  3. Disable Nagle algorithm and enable TCP_QUICKACK by default
  4. Create an option to pass these options into the open method

I am using

  • Julia 1.9.0
  • HTTP.jl 1.9.16

I didn't submit my code I used for benchmarking, but I am happy to do so if requested. I can implement the changes, but I want to know which of the 4 options would best align with the vision of this project

@chelyabinsk chelyabinsk changed the title Make it easy to set TCP_NODELAY and TCP_QUICKHACK on client sockets Make it easy to set TCP_NODELAY and TCP_QUICKACK on client sockets Nov 13, 2023
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 a pull request may close this issue.

1 participant