Project

General

Profile

Tigase clustering with Amazon Elastic Load Balancer

Igor Khomenko
Added over 4 years ago

Hi there,

As I understand, to setup a Tigase cluster with multiple nodes we need a sort of load balancer.

Does Amazon Elastic Load Balancer fits these requirements?

Did you use AWS ELB somewhere in past?


Replies (6)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Tigase has a built-in load balancer, however, the most popular is DNS round-robin. We have not used Amazon's ELB but some of our customers have, so this is another option. However, to use Amazon ELB you have to disable Tigase own LB. Tigase own LB can be, however used together with DNS round-robin.

Tigase LB is recommended way to distribute users as it offers better/more efficient distribution,

Added by Igor Khomenko over 4 years ago

With DNS round-robin it's not the optimal solution cause there is no any failover options - it just divides all load across cluster nodes.

If one of the nodes goes down - it still will receive its own amount of traffic.

Could you please provide some info how to setup Tigase own LB - is it possible to setup 'true' failover like with Amazon ELB?

Added by Igor Khomenko over 4 years ago

I found a documentation about Tigase LB

http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/webhelp/_tigase_load_balancing.html

Let's say we have 2 nodes with IPs: 1.2.3.4 and 1.2.3.5 with hostnames: host1 and host2

domain is set as chat.mydomain.com and DNS is set as chat.mydomain.com -> 1.2.3.4

so all the traffic goes to the first node

Next we would like to enable Tigase LB feature

we set next params on the 1st node:

--cm-see-other-host=tigase.server.xmppclient.SeeOtherHostHashed
c2s/cm-see-other-host/default-host=host1;host2
c2s/cm-see-other-host/active=OPEN;LOGIN

Does it mean that the 1st node will balance a load between itself and the 2nd node? Does it work this way?

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Yes, clients will be redirected to all listed nodes. However there is one requirement - that client support see-other-host redirection (not all do, Psi for example doesn't)

Added by Igor Khomenko over 4 years ago

Thanks, it's clear

One more questions about OPEN;LOGIN values

Will user receive the same stream:error data for both values? Or for LOGIN it will be something else?

http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions-see-other-host

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Error/redirect it the same in both cases. We opted for the separation of open and login to avoid problems - if we decided to send redirect to all clients and if a client doesn't support it then it would make it virtually impossible to connect.

    (1-6/6)