1

I have user facing endpoints like xmpp.host.com. However internally i would like to distribute load between xmpp1.host.com, xmpp2.host.com, ... What is the best possible way for doing this without moving this logic inside the xmpp server itself

BTW i am using ejabberd right now.

2 Answers 2

3

I suggest the use of DNS-based load balancing. By defining multiple SRV records, not only you achieve load balancing, but this can be distributed as you wish (for example you may want 60% of the load on a server with higher capacity, and the remaining to a smaller one), but you can also define failover servers.

An SRV query for an XMPP server like ejabberd may look like: -xmpp_client._tcp.yourdomain

0

The best way is to have xmpp.host.com be a VIP on a load balancer and setup some sort of either sticky load balancing or client-ip based hash so that requests from clients go back to the same server they were logged in to before, this way you don't have to transfer state information between XMPP servers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .