Skip to content

socket.io cluster with sticky-session problems #1944

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

Closed
hussion opened this issue Jan 15, 2015 · 8 comments
Closed

socket.io cluster with sticky-session problems #1944

hussion opened this issue Jan 15, 2015 · 8 comments

Comments

@hussion
Copy link

hussion commented Jan 15, 2015

Recently, i do the socket.io stress test, what make me confused is socket.io use one cpu can support more than 20k connections, but use cluster modle with stikcy-session, it only can support 4k connections. Can someone explain this is what causes it ? help me please !

At last, i hope socket.io can provide a affcial example with cluster. thx. :)

@peteruithoven
Copy link

That might be because then it needs to communicate between multiple instances, using redis pub sub.
This pull request should help with that: socketio/socket.io-redis-adapter#46
Looks like the author also added a small performance test.

@hussion
Copy link
Author

hussion commented Jan 15, 2015

@peteruithoven you mean: i need use multiple instances and not use cluster ?

@peteruithoven
Copy link

When you use clusters you in effect also use multiple instances. Maybe you need to read a little bit more before you start asking for help.

@hussion
Copy link
Author

hussion commented Jan 15, 2015

@peteruithoven First of all want to thank you very much, now my question is I said above , I use a cpu core test (one instance), they can support the 20k number of connections, but I used the cluster mode, but only supports 4k connections , Why do I use the cluster with sticky-session after a drop in performance so much ? you understand I mean?

@peteruithoven
Copy link

I think I understand you. Please at least read the pull request #46
socketio/socket.io-redis-adapter#46 description
and socket.io-redis
issue #41 socketio/socket.io-redis-adapter#41.

On Thu, Jan 15, 2015 at 11:00 AM, hussion [email protected] wrote:

@peteruithoven https://github.com/peteruithoven First of all want to
thank you very much, now my question is I said above , I use a cpu core
test (one instance), they can support the 20k number of connections, but I
used the cluster mode, but only supports 4k connections , Why do I use the
cluster with sticky-session after a drop in performance so much ? you
understand I mean?


Reply to this email directly or view it on GitHub
#1944 (comment)
.

@hussion
Copy link
Author

hussion commented Jan 15, 2015

@peteruithoven oh my friend, what important is i think i should let you know: I did NOT USE "socket.io-redis" , i am now just test how many connections the socket.io server can support.

so now you understand ?

@ebuildy
Copy link

ebuildy commented Jan 27, 2015

I think it's normal because sticky session make your socket.io servers communicate with each others.

@darrachequesne
Copy link
Member

That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).

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

5 participants
@peteruithoven @ebuildy @hussion @darrachequesne and others