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
I created a multiplexed WebSocket client/server based on Pipelines and this example and compared the performance to HttpClient using Http/2 which has multiplexing as well. I get very different results. Am I doing something wrong with HttpClient? Here are my results.
MultiplexedWebSocket: 115,309 per second
HttpClient: 7,075 per second
@AceHack WebSocket's benchmark is almost the same with my code.
But for HttpClient, actually you just used HttpClient itself, that mean they put something more when WebSocket. For example, they put header, They wait until server send the response. that also could be one of the overhead.
In short
WebSocket is the same with TCP, without initiating.
HttpClient(Even Http2) has more overhead than Low-Level TCP like WebSocket.
Http2 is supposed to be multiplexed so I would have expected significant speedups over HttpClient using Http1 but I do not see those speedups. My multiplexed web socket also waits for the server to send the response it just does a ton of them in parallel. Http2 should be able to do the same thing, that is what multiplexing means.
I created a multiplexed WebSocket client/server based on Pipelines and this example and compared the performance to HttpClient using Http/2 which has multiplexing as well. I get very different results. Am I doing something wrong with HttpClient? Here are my results.
MultiplexedWebSocket: 115,309 per second
HttpClient: 7,075 per second
https://github.com/AceHack/MultiplexedWebSockets
The text was updated successfully, but these errors were encountered: