Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

share|improve this answer

Your Answer

 
discard

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.