Aaron Martinez wrote:
>Greetings everyone,
>
>I am considering setting up a jabberd2 installation of maybe 4-5 servers
>and since I haven't seen any built in cluster options I was thinking of
>using relayd to load balance the systems.  I have a few questions that
>hopefully the list gurus can help with.
>
>I'm wondering  what the thoughts are about whether to use layer 3 vs.
>layer 7 for this.
>
>I would definitely want connections to be sticky and i like the route to
>options in the layer 3 for this, but not familiar enough w/the xmpp
>protocol to know if this is feasible.

Certainly feasible. I loadbalance xmpp with relayd using layer 3.

ext_if=em0
ext_xmpp_addr=aaa.bbb.ccc.ddd

table <xmppServers> { 192.168.1.1 192.168.1.2 192.168.1.3 }
redirect xmpp {
   listen on $ext_xmpp_addr port 5222 interface $ext_if
   tag xmpp
   forward to <xmppServers> port 5222 mode roundrobin sticky-address check tcp
}

pf:

pass in on $ext_if inet proto tcp from any to <xmppServers> port 5222 
pass tagged xmpp

>Also, if one of the machines were to become unresponsive that had active
>conversations going on, would there be any way to keep them alive and
>move to another server?  CARP?? using proxy instead of direct to server?

Run CARP and set up relayd the same on each server. Shouldn't be any
problems.

>Lastly, I see there are a few different ways to determine if the hosts
>behind relayd are up, I'm wondering if there is any way to determine
>this with snmp.  Could the check script directive run an snmpget and
>look for some value?  How would relayd determine if the value was good
>or bad?

relayd uses a simple TCP connect to check if the xmpp server is up.
If you need something more comprehensive, you might need to write
a script to query it and come back with some suitable result for relayd
to consider the host is up and happy.


>Thanks in advance.
>
>Aaron

Hope this helps!

Tom

Reply via email to