LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

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

To: <gerd.pickel@xxxxxxxxxxxxxxx>, "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] lvs for failover using weight 0
From: "Adam Niedzwiedzki" <adstar@xxxxxxxxxxx>
Date: Mon, 7 Sep 2009 07:16:05 +1000
I had to implement the same setup, 
Our client wished to move from a load balanced solution to active-passive, I
didn't want to have to install HA or install an additional setup so I went
with this setup..

virtual_server xxx.xxx.xxx.xxx 80 {
        delay_loop 6
        lb_algo sed
        lb_kind DR
        protocol TCP

        real_server xxx.xxx.xxx.xxx 80 {
                weight 65535
                TCP_CHECK {
                        connect_timeout 3
                        connect_port 80
                }
        }

        real_server xxx.xxx.xxx.xxx 80 {
                weight 1
                TCP_CHECK {
                        connect_timeout 3
                        connect_port 80
                }
        }
}

Essentially every 1 in 65535 connections will go to the passive server, this
was an acceptable solution for us.
All other LVS functions work as normal, active goes down all requests go to
the passive, active comes back requests move back etc.

Cheers
Ad

-----Original Message-----
From: lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of it-intuition
Sent: Thursday, 3 September 2009 7:52 AM
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] lvs for failover using weight 0

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



_______________________________________________
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>