LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: general question

To: mma@xxxxxxxxxxxxxx,<lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: general question
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2003 00:45:24 +0900
On Tue, Jun 03, 2003 at 04:38:42PM +0200, Markus Markert wrote:
> Am Dienstag, 3. Juni 2003 15:37 schrieb Horms:
> > On Tue, Jun 03, 2003 at 03:25:43PM +0200, Markus Markert wrote:
> > > hi list,
> > >
> > > is there a other possibility to load balance 2 webserver without
> > > ldirectord? because it will not run on my servers. have test much
> > > configurations :-( and when has somebody a howto for it?
> >
> > From what I read of your email last night, your problems have nothing to
> > do with ldirectord.  Ldirectord is working fine. The problem lies in the
> > interaction of LVS and your network.  The type of confguration that you
> > are trying to set up - two nodes that act as linux directors and real
> > servers - is very tricky to get right. Actually I regret putting
> > information about how to set up such a configuration on the web. Because
> > it seems to cause people a lot of problems.
> > Please try using LVS-DR as I suggested and make sure that the routing on
> > your machines is setup correctly. This setup can be made to work,
> > but requires a lot of patience.
> 
> i have configured the virtual server in ldirectord.conf as gate, but there is 
> allways the same problem. 
> 
> my routing is ok.
>       ds11:/etc/ha.d # /sbin/ip route show 0/0
>       default via 192.168.0.1 dev eth0

I assume 192.168.0.1 is the gatway router of your network,
in that case what you have looks good.

> maybe the problem is the sysctl.conf. i have the suse 8.1 distribution and 
> there is no sysctl.conf where i can do this:
>       # Enable configuration of hidden devices
>       net.ipv4.conf.all.hidden = 1
>       # Make the loopback device hidden
>       net.ipv4.conf.lo.hidden = 1

That would definately be a problem. Try manipulating the
/proc entries by hand.

echo 1 > /proc/sys/net/ipv4/conf/all/hidden
echo 1 > /proc/sys/net/ipv4/conf/lo/hidden

As mentioned previously, someone told me that they needed
the following to get this setup to work.

echo 0 > /proc/sys/net/ipv4/conf/all/hidden


You will also need to make sure you have the hidden patch applied
to your kernel. It is available from
http://www.linuxvirtualserver.org/~julian/ 
I am not sure if you kernel already has this or not.

> if you could help me with this tricky configuration, i am will be going to 
> write a howto in englisch and german with my experiences ;-)
> 
> > Alternatively, if you are happy to only have one real server
> > active at any time. You may want to consider not using LVS and
> > ldirectord at all and just use heartbeat to manage the VIP.
> 
> i should have a loadbalancer. ip-failover of heartbeat is not enough.
> 
> can somebody tell me the coherences between heartbeat (haresource) and 
> ldirectord (virtual server)? i mean the coherences about the virtual ip. i 
> don't understand it exactly.

Here is how the parts work.

heartbeat makes sure exactly one linux director has the VIP at
any given time.

ldirectord monitors the real servers - in this case the
host it is running on and the other linux director.
It updates the lvs kernel table using ipvsadm accordingly.

LVS runs in the kernel and actually does the load balancing.

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