I\'m trying to understand which are the \"physical\" limits of my application.
On the client side:
var socket = io.connect(\"http://127.0.0.1:6701\")
It's better if client sends a "terminate" command to server which then closes the connection, than the other way around.
Server will always wait until a timeout before giving up on a connection. Even if that timeout is small, with loads of connections coming in, it will overload it. That's why, for example, is always good to disable keep-alive on app servers.
Delay helps because server has time to close the connection before opening a new one.