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
Slow transferring files to client - HOL blocking? #228
Comments
I think this issue has less to do with HOL blocking on the lower-level networking side of things and more to do with the fact that Try replacing |
@fschr Concurrent calls to WriteMessage are not supported. |
@garyburd I'm measuring the time for the client to establish a connection and receive 100 messages (over WAN). Example in Chrome:
I made a HTTP/2 server in Node.js for comparison. Establishing a connection and pushing the same amount of data takes ~600ms compared to multiple seconds with WS. Server code
Client code
|
The issue may be with the client code. Please report the results using this Go client code:
What is the time to return the same amount of data in an HTTP response? |
@garyburd Each run took between 2.5 and 3.5 seconds using the Go client code you provided and the same Go server as described in the first post. It's definitely an improvement to the JS client, but still a fair bit slower than the HTTP/2 implementation. I've added timestamps for when each message is being sent from the server (see code and output below). It seems like there are sometimes 100-300ms gaps between consecutive messages. Any ideas why this occurs? Server code
Server output
|
The gaps are caused by write to the network connection. What is the time to return the same amount of data in an HTTP response using a Go server and client? Does the node client read the data? |
@marwankhalili, @garyburd I noticed that the Node client measured the time to open 100 streams instead of the time for all streams to be closed. Corrected the client code for HTTP/2 which performs subpar to WebSocket. Fixed HTTP/2 client
|
I noticed that there are significant delays when repeatedly transferring a file (10 - 100 kB) from server to client using the same connection/socket. E.g. transferring 100kB file with 100 repetitions takes up to 7 seconds.
My first hunch is that the connection is susceptible to HOL blocking, or have I missed something?
Server code
The text was updated successfully, but these errors were encountered: