Project

General

Profile

Load balancing MUC: ReceiverBareJidLB or SenderBareJidLB?

Igor Khomenko
Added about 4 years ago

I have found that it's possible to have 2 MUC components and spread load between them

http://docs.tigase.org/tigase-server/5.3.0/adminguide/#_load_balancing_external_component

It's clear what is ReceiverBareJidLB strategy - it's like tigase server spreads load between MUC components - 1st MUC works with one part of rooms, 2nd works with other part of rooms.

But what is SenderBareJidLB strategy?

Could you please explain what does "For transports" mean

This distribution strategy does not always work for all possible components however. For transports for example this would not work at all. A better way to spread load for transports would be based on the source bare JID. And it is possible of course if you use plugin with class name: SenderBareJidLB.


Replies (5)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

"Transports" are XMPP entities responsible for allowing communication with other networks (for example AIM, etc) but because transport address is always the same (e.g. @aim.tigase.test@) then load balancing based on that address will simply not work (or rather to be more exact - it will not result in any load balancing).

(1)

Added by Igor Khomenko about 4 years ago

Thanks, it's clear,

If we don't use transports, the only one way to build a MUC "cluster" is to use ReceiverBareJidLB strategy.

1) it's like tigase server spreads load between MUC components - 1st MUC works with one part of rooms, 2nd works with other part of rooms.

2) and if 1st MUC node goes down - all load goes to the 2nd MUC node?

3) In this case how will feel users from node1? They need just to reconnect to MUC?

Do I understand correctly how it works?

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Actually, when using external components, each room will be managed by each external component so in case of one node being shut down all users of rooms on that node will need to re-enter the room (on other node). In contrast, when using ACS-MUC with default strategy the load (and rooms) is shared between all nodes.

Added by Igor Khomenko about 4 years ago

Thanks Wojciech,

but I'm still not sure how ReceiverBareJidLB works

you say that

Actually, when using external components, each room will be managed by each external component so in case of one node being shut down all users of rooms on that node will need to re-enter the room (on other node)

but this docs says that

http://docs.tigase.org/tigase-server/5.3.0/adminguide/#_load_balancing_external_component

Load balancing plugin decides how the traffic is distributed among different component connections that is different component instances. For the MUC component it does make sense to distribute the traffic based on the receiver bare JID because this is the MUC room address. This way we just distribute MUC rooms and traffic over different MUC component instances.

So according to the documentation I guess that each MUC node handles its part of rooms

Added by Wojciech Kapcia TigaseTeam about 4 years ago

This is exactly what I wrote.

You have external-muc1 which handles room1, room3 and you have external-muc2 which handles room2, room4 (for example).

    (1-5/5)