[ejabberd] External Component Load Balancing
melo at simplicidade.org
Tue Jan 26 19:29:42 MSK 2010
On Tue, Jan 26, 2010 at 4:13 PM, Paul Aurich <paul at darkrain42.org> wrote:
> On Jan 26, 2010, at 03:05, Pedro Melo wrote:
>> then all stanzas for client with jid X will end-up in the same
>> component instance. As long as your query originates in that
>> component, the answer will arrive at the proper component. Of course
>> if two or more instances of your component die at the same time, the
>> order of components might change and all bets are off (my
>> understanding of the code 3 years ago, it might have changed by now).
> It's my understanding that the "domain_balancing_component_number" is designed specifically to address this problem with what you described, in that it makes the algorithm stable even if one or more of the components disconnect[s] (of course, this will mean sessions handled by an offline component are just DOWN instead of being handled by a different component).
That parameter helps in a lot of cases but it does not guarantee that
after two instances die and reconnect at the same time, they will get
the same JIDs that they where getting before the disconnect.
If you have 5 instances connected, and ejabberd orders them like A B C
D E, if B and D die at the same time and reconnect, you could end up
as A D C B E.
That is enough for most people, because A C and E are unaffected. But
you must be aware that B and D can end up in different slots.
Again, haven't looked at the current code, but it was like this at the time.
xmpp:melo at simplicidade.org
mailto:melo at simplicidade.org
More information about the ejabberd