R
Railway16mo ago
kevin

After deploying more than 1 replica set for my server, websocket stopped working.

Anything I can check about it? Issues or discussions?
7 Replies
Percy
Percy16mo ago
Project ID: 1c75cd96-f9af-4552-afd9-e563c1c8a532
kevin
kevin16mo ago
1c75cd96-f9af-4552-afd9-e563c1c8a532
Brody
Brody16mo ago
i cant reproduce this issue, can you give us more information
kevin
kevin16mo ago
It's weird.. I've been using 1 replica set since forever. Yesterday I changed to deploy 10 replica sets of our server... The only thing that didn't work and fails to connect is our websocket
Brody
Brody16mo ago
we are going to need more specifics than "WebSocket fails to connect" since i cant reproduce this myself, i need all the information i can get from you
kevin
kevin16mo ago
Got it Looks like if we use socket.io with multiple replica sets we gotta define the sessionAffinity as ClientIP.. If you plan to distribute the load of connections among different processes or machines, you have to make sure that all requests associated with a particular session ID reach the process that originated them. It's what socket.io calls: Sticky load balancing
Brody
Brody16mo ago
ah yeah you are using socket.io, that would have been very good information to know
Want results from more Discord servers?
Add your server