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

[question] socket.io sticky session / multiple nodes #2336

Open
niztal opened this issue May 6, 2024 · 3 comments
Open

[question] socket.io sticky session / multiple nodes #2336

niztal opened this issue May 6, 2024 · 3 comments
Labels
question Further information is requested

Comments

@niztal
Copy link
Contributor

niztal commented May 6, 2024

Hi,

I've seen flowise is based on socket.io in order to communicate with the client.
I wonder what would happen if flowise will have multiple nodes/replicas/pods, how can we keep that the sessions of socket.io won't be sticky to a specific node/replica/pod?

I didn't see flowise has the option to integrate socket.io with a certain adapter (https://socket.io/docs/v4/using-multiple-nodes/#enabling-sticky-session) nor configure the transports as websocket

Thanks,

@niztal
Copy link
Contributor Author

niztal commented May 8, 2024

@HenryHengZJ ?

@HenryHengZJ
Copy link
Contributor

a new socket connection is established/closed whenever user open or close the chatbox, so in the case of multiple nodes/replicas/pods I dont think that will be an issue. Though we are working on using SSE and moving away from socketio

@HenryHengZJ HenryHengZJ added the question Further information is requested label May 8, 2024
@niztal
Copy link
Contributor Author

niztal commented May 9, 2024

a new socket connection is established/closed whenever user open or close the chatbox, so in the case of multiple nodes/replicas/pods I dont think that will be an issue. Though we are working on using SSE and moving away from socketio

I'm not sure that's true.

Think of a case where you're using kubernetes and you have a public ingress, your service holds let's say 3 pods for the example.
Now once you open the chatbot you were interacting with pod #1 , later on the ingress decided to route your request to pod #3. In that case the application will fail.
In such cases you must use persistency in order to avoid session stickiness.

LMK if I miss anything.

Thanks @HenryHengZJ

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

No branches or pull requests

2 participants