[ULTRAMONKEY-USERS] help with streamlined HA LB cluster config on debian etch
Denis
denismpa at gmail.com
Wed Dec 19 04:50:05 EST 2007
Jacki,
Looking closer your first message, we can see that when you run an
ipvsadm, one of your nodes has a weight of 0, It might be the reason
because the connections aren't being routed to it.
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP <virtual_ip>:www wlc
-> <ip_of_ldirector>:www Local 0 0 0
-> host2:www Route 1 0 0
Then, why does your remote server have a weight of 0 even you have
configured that?
It could be because Ldirectord is seeing it dead.
Try changing the quiescent option to off. This means that if
ldirectord guess that a server is down, it'll be removed from the list
of realservers on a ipvsadm answer.
It shall appear like that:
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP <virtual_ip>:www wlc
-> host2:www Route 1 0 0
Otherwise, for debug your ldirectord Connection, u can change the
autoreload to yes, your type of checking to 'connect' and comment the
lines referred to 'request' and 'receive'.
2007/12/18, Jacqueline Buros <jburos at gmail.com>:
> Hi Denis, thanks for the reply!
>
> Unfortunately I think I have configured weights -- though perhaps not
> correctly. See below for my configuration files (including ldirectord.cf).
>
> Also, I will take a look at your configuration example as it appears to
> do more with IPTABLES than I am currently doing, also it appears that
> you have made use of several NICs rather than 1. These may explain my
> problem. Do you use a cross-over patch cable for your LVSSyncDaemon? I
> may need to do this as well.
Actually I got three nics on those machines. Two are because they're
proxies, and the thirty intents to be used for Heartbeat monitoring,
drbd exchange, and rsync stuffs.
Regarding the iptables, if you're not blocking the traffic between
your machines (INPUT & OUTPUT in both directions) you don't need to
worry about that.
Take a look to my Ldirectord configuration:
Proxy-Node2:~# cat /etc/ha.d/ldirectord.cf
checktimeout=16
checkinterval=2
autoreload=yes
logfile="local0"
quiescent=no
#fallback=127.0.0.1:80 gate
virtual=172.16.8.77:3128
real= 172.16.8.85:3128 gate 5
real= 172.16.8.83:3128 gate 4
real= 172.16.8.86:3128 gate 1
# fallback=127.0.0.1:80 masq
service=http
# request="ldirnode.html"
# receive="squid running"
scheduler=wlc
persistent=180
protocol=tcp
checktype=connect
>
> Any additional comments or suggestions would be much appreciated!!
>
> Thanks!!
> Jacki
>
Cheers,
D.
>
> user at lb1:~$ sudo cat /etc/ha.d/ldirectord.cf
> checktimeout=10
> checkinterval=2
> autoreload=no
> logfile="local0"
> quiescent=yes
>
> virtual=<virtualserver_ip>:80
> real=<realserver1_ip> gate 1
> real=<realserver1_ip> gate 1
> fallback=127.0.0.1:80 gate
> service=http
> request="/ldirectord.html"
> receive="Test Page"
> scheduler=wlc
> protocol=tcp
> checktype=negotiate
>
> user at lb1:~$ cat /etc/ha.d/haresources
> lb1 \
> ldirectord::ldirectord.cf\
> LVSSyncDaemonSwap::master::eth1\
> IPaddr2::<virtual_ip>/24/eth1/207.211.0.255
>
> user at lb1:~$ cat /etc/ha.d/ha.cf
> logfacility local0
> bcast eth1
> mcast eth1 225.0.0.1 694 1 0
> debugfile /var/log/ha-debug
> logfile /var/log/ha-log
> auto_failback on
> node lb1
> node lb2
> respawn hacluster /usr/lib/heartbeat/ipfail
> apiauth ipfail gid=haclient uid=hacluster
>
>
>
>
>
> Denis wrote:
> > Hi, Jackie!
> >
> > I have one streamlined hl lb proxy workin well enough.
> >
> > I ve seem that u haven't configured the weights of your servers. It
> > might be a problem.
> >
> > Can u try configuring weights?
> >
> > My ldirectord.cf looks like
> >
> > virtual=172.16.8.77:3128
> > real= 172.16.8.85:3128 gate 5
> > real= 172.16.8.83:3128 gate 4
> > real= 172.16.8.86:3128 gate 1
> >
> > Here I have this differents weights because I got different links
> > speeds on each server.
> >
> > But u can use wheights like 1 and 1. to have a half-half balancing.
> >
> > Here goes a documment I've written about configuring my hl lb proxy
> > using Debian.
> >
> > http://ha.linuxchix.org.br/proxy-ha.pdf
> >
> > It's in portuguese, but u can get an idea.
> >
> > anyway, if u need help understanding that, U can write me in pvt or by gtalk.
> >
> > Cheers,
> >
> > Denis Anjos.
> >
> >
> > 2007/12/17, Jacqueline Buros <jburos at gmail.com>:
> >
> >> Hi ..
> >>
> >> I have a 2 identical linux machines, each running debian etch, each with
> >> one NIC (eth1).
> >>
> >> Goal is to have both act as the "real servers", and for one to be the
> >> linux director with other as fallback. I would like for server loads to
> >> be balanced between both real servers, no matter which is the active
> >> linux-director.
> >>
> >> I have set up heartbeat + ldirectord as described here :
> >> http://www.ultramonkey.org/2.0.1/topologies/sl-ha-lb-overview.html
> >>
> >> Everything seems to work beautifully -- except, my packets are never
> >> forwarded to the localhost (except as fallback if I take the other
> >> realserver down).
> >>
> >> The output of my ipvsadm looks like this:
> >>
> >> IP Virtual Server version 1.2.1 (size=4096)
> >> Prot LocalAddress:Port Scheduler Flags
> >> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
> >> TCP <virtual_ip>:www wlc
> >> -> <ip_of_ldirector>:www Local 0 0 0
> >> -> host2:www Route 1 0 0
> >>
> >> I have read elsewhere that the linux packets will not be forwarded to
> >> localhost by default. Also, my checktype is "negotiate", and if I try to
> >> get the test.html page from the ldirector (as either
> >> http://localhost/test.html or http://<ip_of_ldirector>/test.html, the
> >> connection times out.
> >>
> >> Can someone suggest how I might set up the connection so that the load
> >> is balanced between the realserver on the active linux director as well
> >> as that on the backup??
> >>
> >> Many thanks in advance --
> >> Jacki
> >> _______________________________________________
> >> Ultramonkey-users mailing list
> >> Ultramonkey-users at vergenet.net
> >> http://lists.vergenet.net/listinfo/ultramonkey-users
> >>
> >>
> >
> >
> >
>
--
Denis Anjos.
Cisco Certified Network Associate.
Universidade Federal do ABC
Santo André - SP - BR
More information about the Ultramonkey-users
mailing list