schemacs
schemacs

Reputation: 2891

How to do ejabberd cluster load balancing the right way?

I have set up one cluster (node1 and node2) by following steps here in the same domain(talk.example.com).

I have tested the cluster with two clients, which are connected to different nodes' ip(not the domain talk.example.com). But I want to know how to distribute clients in the cluster if I want to the clients to connect to the DNS record(talk.example.com), not the IPs for the nodes in the cluster?

DNS round robin?I don't know if this work for the same client if different ip is return for the same clients, for XMPP protocol is stateful。Or Linux Virtual Server? I have never try this before.

I have read Service Load-Balancing, but which node will be the frontend(the one that client will connect to)?

Upvotes: 3

Views: 2380

Answers (1)

Dmitry Belyaev
Dmitry Belyaev

Reputation: 2593

You'll have to use either DNS balancing or load balancer such as haproxy or even both.

DNS is actually the simplest one but you need to remember that it is the SRV record _xmpp-client._tcp.{your domain} has to be balanced, not your real domain.

Upvotes: 4

Related Questions