LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] lvs for failover using weight 0

To: <jjohndu@xxxxxxxxx>, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] lvs for failover using weight 0
From: "it-intuition" <gerd.pickel@xxxxxxxxxxxxxxx>
Date: Sun, 6 Sep 2009 22:53:45 +0200
Hi John,

>>On Wed, Sep 2, 2009 at 2:52 PM, it-intuition
<gerd.pickel@xxxxxxxxxxxxxxx> wrote:
>>
>>Hello,
>>
>>we are currently using lvs for balancing two webservers by using the
wrr
>>scheduler in combination with persistance.
>>Now we want to modify our setup to use one primary webserver and a
>>secondary webserver as a backup server. My idea was to set the weight
of
>>the primary webserver to 1000 and for the backup server to 0.
>>
>>These are the question that came up in my mind:
>>
>>1. How will this setup behave if the primary webserver is down?
>>
>>2. How will this setup behave if the primary webserver is up again?
>>
>>3. Does a weight of 0 mean, that no connection to the backup server
can
>>be made (if the primary webserver is down)?
>>
>>The last question may sound stupid, but I read that a weight of 0 is
>>often used to silently take a server out of a pool.
>>So I think a weight of 0 prevents clients to connect; which is not the
>>effect I want for our setup.
>>
>>Any help or comments would be appreciated.
>>
>>Gerd
>>
>>

>I run 4 OpenLDAP servers in multi-maser mode.  The LDAP servers are
behind an LVS director.  I also use wrr and set the weights to 250000,
>1, 1, 1.  As long as the primary server is running clients will connect
to it and the primary LDAP server will replicate to the other
>three servers.  If the primary is down, clients will connect to the
other three equally.

>I am not using all four servers at the same time because the OpenLDAP
muti-master replication is not very reliable in my experience.
>Essentially, I am using LVS to make the LDAP service highly available.
It has been working really well for me.
>
This was my first idea too. I set the weight for the primary webserver
to 65000 and for the backup webserver to 1.
I waited a adequate time to see if the effect I wished become true. But
there were still new connections on the lower weighted webserver.
I think I read (don't remember where) in the documentation about lvs,
that the combination of the source ip of a client and it's target host
is 'cached'. So, by setting a higher weight to the primary webserver
would not change the behavior of the system at all. 
Knowing this, the following scenario will end up in a impasse:

- you have a configuration were all connections are passed to the high
weighted webserver
- this webserver is going down
- all connections go to the lower weighted webserver
- primary webserver comes up again
- all connections that were made, in the time the high weighted
webserver was down, are still passed to the lower weighted server
- you'll end up with splitted connections

This is a situation we want to avoid because at least we have to reboot
our lvs directors...
Maybe I am wrong about the behavior. If so, please let me know.

Thanks!

Gerd


>______________________________________________
>Please read the documentation before posting - it's available at:
>http://www.linuxvirtualserver.org/
>
>LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
>Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
>or go to http://lists.graemef.net/mailman/listinfo/lvs-users


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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