LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: no load balance with ldirectord

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: no load balance with ldirectord
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 3 Jun 2003 00:59:48 +0900
On Mon, Jun 02, 2003 at 05:25:05PM +0200, Markus Markert wrote:
> hi list,
> 
> i have two machines with apache,ipvsadm,ldirectord and heartbeat on it.
> the haresources,ldirectord.cf and the ha.cf are attached.
> but when i stop the apache service on the ds11(master),
> the http service on the virtual server is not reachable :-( fu**, this
> is the last what i must do with the servers and such problems with it.
> 
> ipvsadm says before stopping the apache this:
> [slave-ds10]
> ds10:/etc/ha.d # ipvsadm
> IP Virtual Server version 1.0.6 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> > RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  192.168.0.162:http rr
>    -> ds11:http                         Masq    1      0          0
>    -> ds10.suchtreffer.de:http     Local   1      0          0
> 
> [master-ds11]
> ds11:/usr/lib/perl5/site_perl/5.8.0 # ipvsadm
> IP Virtual Server version 1.0.6 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>  RemoteAddress:Port           Forward Weight ActiveConn InActConn
> 
> TCP  192.168.0.162:http rr
>   -> ds11:http                    Local    1      0          0
>   -> ds10:http                    Masq    1      0          0

Does this setup work? I suspect htat connections to the
Local node will work, but the Masq ones won't.

> and after stopping the apache on the ds11 (ds11 has the virtual ip adress)
> 
> [slave-ds10]
> ds10:/etc/ha.d # ipvsadm
> IP Virtual Server version 1.0.6 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  192.168.0.162:http rr
>   -> ds10.suchtreffer.de:http     Local   1      0          0
> 
> [master-ds11]
> ds11:/usr/lib/perl5/site_perl/5.8.0 # ipvsadm
> IP Virtual Server version 1.0.6 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  192.168.0.162:http rr
>  -> ds10:http                    Masq    1      0          0
> 
> hmmmm, whats going wrong here?
> 
> greetings from a very stormy lake contance

Do you really want the connections to be handled using LVS-NAT (Masq).
I am assuming that both ds10 and ds11 have direct connections
to the external network. If this is the case it makes a lot
more sense to use LVS-DR (Gate) for this application. In fact I
am not entirley convinced that it can be made to work with LVS-NAT 
at all.

The main pronblem that you will come up against in seting up
LVS-DR is the the ever-present ARP problem. However if you
are running heartbeat 1.0.2 (which I think you are) then
it is able to deal with removing aliases on the loopback interface
and restoring them. Thus when one of the linux directors
becomes the active linux director the VIP typically moves from lo:0
to eth0:0. And the reverse occurs when a linux director becomes
a stand-by. 

Please note that the lo:0 interfaces need to be brought up, before
heartbeat is started. This is typically done using your distributions
networking setup.

I have some discussion of how to set this up on
ultramonkey.org. Given your configuration files,
I think you have seen this. 

http://www.ultramonkey.org/2.0.1/topologies/sl-ha-lb-eg.html

One thing that has been reported to me, but I have not tested
is that in sysctl.conf net.ipv4.conf.all.hidden should
be set to 0 and not 1 as I have documented. AFIK that should
not be the case, but you may want to try it anyway.

-- 
Horms
<Prev in Thread] Current Thread [Next in Thread>