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
By default, HTTP.WebSockets uses a TCP socket configuration that is rather slow:
In the default setting, HTTP.WebSockets takes about 0.04s to respond to a request from a python websockets client.
An equivalent python server takes only 0.0002s to respond.
However, if one disables Nagel's algorithm on the tcp socket, the Julia implementation is on par.
In fact, with the tuned socket below I get Julia to 1e-5s response time.
functionserver()
server = WebSockets.listen!("127.0.0.1", 8081) do ws
# without these options below, the socket is way too slow.
Sockets.nagle(ws.io.io, false)
Sockets.quickack(ws.io.io, true)
for msg in ws
WebSockets.send(ws, msg)
endendend
Proposal: It would be nice to make this tuning the default and expose some relevent settings via the keywords of HTTP.WebSockets.listen! and HTTP.WebSockets.open.
The text was updated successfully, but these errors were encountered:
By default,
HTTP.WebSockets
uses a TCP socket configuration that is rather slow:HTTP.WebSockets
takes about 0.04s to respond to a request from a python websockets client.However, if one disables Nagel's algorithm on the tcp socket, the Julia implementation is on par.
In fact, with the tuned socket below I get Julia to 1e-5s response time.
Proposal: It would be nice to make this tuning the default and expose some relevent settings via the keywords of
HTTP.WebSockets.listen!
andHTTP.WebSockets.open
.The text was updated successfully, but these errors were encountered: