High Availability Netty Server

I looked at a similar question: Netty High Availability Cluster . The scenario I have is: there is a web site server to which various native javascript web clients connect. I am considering the basic high availability of the websocket server and want it to go to the backup server if necessary.

The question in the link above talks about netty clients, but since I don't have clients written in netter, I thought my scenario would be different from this question. I'm right?

Can someone suggest some way to do this, since I assume this would be a pretty important requirement sometimes?

+4
source share
3 answers

Since web sockets are connection-oriented, if your server is running, then your connection to the web socket is also.

So, for high availability, I think you will need to configure your javascript code to catch connection errors and reconnect / login.

This way you can put multiple Netty servers behind a load balancer.

Hope this helps.

+3
source

Assuming you have no control over your clients, how about having multiple network servers behind a traditional load balancer and maintaining session state in a hazelcast or infinispan cluster? Both platforms allow you to either embed them directly on your server, or have a remote cache.

+2
source

Xitrum is very suitable for your needs. It uses Hazelcast to scale to multiple servers.

You can try the demo of WebSocket .

To enable cluster mode, simply set “multicast” and / or “tcp-ip” in config / hazelcast_cluster_member_or_super_client.xml to true and start several servers.

+2
source

All Articles