XMPP Perlbal-like implementation

Daniel Ruoso daniel at ruoso.com
Wed Apr 9 14:04:01 UTC 2008


Hi,

I'm implementing some services using XMPP and I'd like to load balance
them using the following schema:

 Some Server
      ^
      |
      |
 XEP-0225/0114
   or even
S2S connections
      |
      |
      v                       (XMPP-Client Agent Instances)
Load-Balancing  <--- same jid ---|b|------> A
  Component                      |a|------> B
                                 |l|------> C
                                 |a|------> D
                                 |n|------> E
                                 |c|------> F
                                 |e|------> G

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
routing.

Other option would be to implement it as standard s2s connections,
instead of using component connection, which would only require the
routing implementation.

I started to navigate in djabberd sources, but I don't know exactly
where to look to understand how this could be implemented.

daniel



More information about the Djabberd mailing list