uNetworking / uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications
Apache License 2.0
17.42k stars 1.76k forks source link

µWebSockets.js => ~30.000 ; µWebSockets => ~1.015 ? #1766

Closed alexe100 closed 3 months ago

alexe100 commented 3 months ago

Hi I am trying to make some preliminary tests to both µWebSockets.js and µWebSockets in order to find out some aproximate limits in terms of supported concurrent websocket connections. µWebSockets was compiled with: LIBUV=1 make examples

Env: Ubuntu 20, 16GB of RAM

Then, in localhost, I launched the EchoServer and used a nodejs client to create as much as possible websocket connections using WS. Only aproximate 1.015 are accepted

Then I launched the the sample nodejs in https://github.com/uNetworking/uWebSockets.js page and using the same client. Now the client can reach ~30.000 successed websocket connections.

Why is this happen? Is the nodejs I/O system more capable than LibUV? Hopw can I reach at least the same results using the C++ version?

Thank you

uNetworkingAB commented 3 months ago

https://medium.com/@unetworkingab/millions-of-active-websockets-with-node-js-7dc575746a01