简体   繁体   中英

NodeJS socket.io change connection fast

I am trying to implement a zero downtime socket.io cluster environment in NodeJS.
My goal is to distribute the server load in multiple node instances using Redis to sync data.

I was wounding if its possible, once a new change is detected, to make the socket.io client's reconnect on another instance without any down time or data loss.

To resume my idea,

If this is a restful webservice this shouldn't be an issue. If you load balance your NodeJS servers and all the servers are connected to the same redis instance or cluster then when you gracefully pull a server out of your load balancers rotation there should be no noticeable downtime for your clients. Really this methodology would work for any environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM