Skip to content

How to handle reconnection on node teardown with multiple nodes scenario #4809

Closed Answered by giuliopulina
giovanni-bertoncelli asked this question in Q&A
Discussion options

You must be logged in to vote

If I understood well: you have clients connected to a node that get torn down (maybe due to autoscaling policies, maybe because the node becomes unhealthy).
So, now you have clients disconnected, probably getting tons of errors in the JS console (or in the UI), and not able to use your application. Am I correct?

In this scenario, if you don't need to synchronize the state of the client upon reconnection (i.e. you can live with lost messages), reconnection upon "transport close" disconnection is just a matter of configuration (see 'reconnection*' options in https://socket.io/docs/v4/client-options/. Also check disconnect docs for details about disconnect events.)

Obviously, you have to con…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@giovanni-bertoncelli
Comment options

@giuliopulina
Comment options

Answer selected by giovanni-bertoncelli
@giovanni-bertoncelli
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants