Skip to content
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

Can't open more than x sockets with server from a single client... #5

Closed
jondubois opened this issue Jun 4, 2014 · 1 comment
Closed

Comments

@jondubois
Copy link
Member

Thanks to Cyrus for notifying me of this issue:

Basically, when trying to stress test SocketCluster with a single client, you might run into the issue of new sockets not connecting past a certain number (e.g. 20).

@jondubois
Copy link
Member Author

This is a security feature of SocketCluster designed to prevent malicious clients from hogging up unlimited connections (and DOS-ing your server).

If you want to get rid of the limit, set the addressSocketLimit start option to 0.
I.e:
new SocketCluster({
...,
addressSocketLimit: 0
}).

It's probably best to have a limit set when running your server in production though. This is a gotcha of using the stateful WebSocket protocol.

If you have a good firewall (that handles WebSockets properly) or you've written some protective code in your balancerController file then it might be safe to set addressSocketLimit to 0. The addressSocketLimit option is just SocketCluster's default way of handling the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant