Closed be-thomas closed 3 years ago
uWS has built-in heartbeat and timeout management. That's what idleTimeout is. If you set it to 0 it won't close connections and you'll have an equal case.
https://alexhultman.medium.com/millions-of-active-websockets-with-node-js-7dc575746a01
Node ws library is able to handle 20K concurrent connections easily. However, uws is struggling beyond was. And I thought this was faster. Please inform me if I'm missed something in my code.
My observation while stress testing is that, just after 5.8K opened connections, the uWS server starts dropping many connections(around 700 of them) and goes down to 5.1K connections. After that it keeps connecting more until it reaches that 5.8K connections where again it drops around 700 connections and goes down to 5.1K. So it has some kind of rotational mechanism. But I'm not sure what this is for.
This can be reproduced.
Node uWS server code -
Node WS client code -
I want to know how to increase this 5.8K limit.