Trouble with load balancing socket.io with redis and nginx #4178
Answered
by
darrachequesne
lenguyenkhoi21
asked this question in
Q&A
-
I've 3 server socket.io, using redis adapter and nginx for load balancing. When I test in my computer, there is only server is using, and the last two server socket.io can't be routed to ? How to test with three server routing ? Here is my code: https://github.com/lenguyenkhoi21/socketio-scale |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Nov 24, 2021
Replies: 1 comment 3 replies
-
It seems the session stickiness is based on the IP, so you need clients from different IP adresses. Please check the example here: https://github.com/socketio/socket.io/tree/master/examples/cluster-nginx |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
darrachequesne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems the session stickiness is based on the IP, so you need clients from different IP adresses.
Please check the example here: https://github.com/socketio/socket.io/tree/master/examples/cluster-nginx