Project

General

Profile

High Availablity/Load balancing recommandations for Tigase using third party solutons in addition to Tigase clustering

Hamid Alimohammadi
Added about 4 years ago

Hi,

We have installed three Tigase servers running in cluster mode.

Generally, the servers in cluster mode work fine, but when it comes to load balancing, the DNS round robin was used and as you know DNS round robin is not a perfect load balancing or HA solution.

To overcome this, we have tried a third party HA HAProxy [[[http://en.wikipedia.org/wiki/HAProxy]]]

To our initial tests, the HAProxy seemed to work properly and it was distributing the loads between the 3 servers properly, but occasionally we face odd behavior from HAProxy. Actually I am not sure if the problem is related to a misconfiguration in HAProxy or may be we should think for another HA solution compatible with Tigase.

Any advice is highly appreciate.


Replies (4)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

We had quite good and even users distribution with DNS round robin and it can be used for HA if you have a failover mechanism which preserves IP address from failed machine onto a replacement machine.

Another option (apart from HAProxy) is Tigase built-in load balancing capabilities. I think this is the most optimal solution as Tigase LB understand XMPP and can distribute user's connections in more optimal way than just random distribution offered by DNS round-robin or any general purpose LB. Tigase LB also is aware of the clustering mode and all working cluster nodes, so it handles very well a case when one of the nodes goes down or a new node is added to the system. Everything is automatic, so there is no need to play with configuration or any hassle when the cluster changes.

The Tigase's LB uses XMPP redirect feature which is defined in the core RFC for XMPP, so most XMPP client should support it.

In my opinion the best approach is to combine DNS round-robin with Tigase's LB. If they work together you get good user distribution and effective failover in case of cluster node crash.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

We had quite good user distribution with DNS round-robin and it can also be used for HA if you have a mechanism which assigns IP from broken machine to a failover machine. But even without it, it can still work pretty well.

However, I think the best option is to use Tigase's built-in load balancer. It is the most effective solution as it has a understanding of the XMPP specifics and can distribute users more effectively than any random load balancer can do. It also is aware of the cluster configuration and changes and can handle adding/removing cluster nodes fully automatically.

Tigase's LB is based on XMPP redirect feature which is defined in core RFC for XMPP so most of the clients should support it.

The best approach in my opinion is to combine DNS round-robin with Tigase's LB. This way you have simply to maintain system with good user distribution and reliable failover.

Added by Hamid Alimohammadi about 4 years ago

Thank you very much for information.

Are the Tigase's LB capabilities only available in Tigase ALB or they are also available in ordinary Tigase's LB?

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Hamid Alimohammadi wrote:

Are the Tigase's LB capabilities only available in Tigase ALB or they are also available in ordinary Tigase's LB?

Load Balancing capabilities are build into Tigase (v. Tigase Load Balancing.) Tigase ALB is an advance logic of Tigase LB allowing the most optimum user distribution.

    (1-4/4)