XMPP Perlbal-like implementation
daniel at ruoso.com
Wed Apr 9 14:04:01 UTC 2008
I'm implementing some services using XMPP and I'd like to load balance
them using the following schema:
v (XMPP-Client Agent Instances)
Load-Balancing <--- same jid ---|b|------> A
Component |a|------> B
The idea is pretty simple, the component registers itself in some
server, and accepts connection from clients, allowing a JID to connect
more than once, and then dispatch the incoming messages to the clients
grouped by the jid, doing a job very similar to the one done by perlbal.
The only exception I can see so far is that iq replies should be routed
to the same client that sent the get/set request.
This doesn't seem too hard to implement, since DJabberd already have
both the ClientIn and ComponentOut connections, so it's just a matter of
letting more than one connection from the same JID and implementing the
Other option would be to implement it as standard s2s connections,
instead of using component connection, which would only require the
I started to navigate in djabberd sources, but I don't know exactly
where to look to understand how this could be implemented.
More information about the Djabberd