Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have user facing endpoints like However internally i would like to distribute load between,, ... 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.

share|improve this question

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

share|improve this answer

The best way is to have 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.