[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-virtual-server
Subject:    Re: [lvs-users] Setting Weight to 0 and still accepting connections
From:       "Sebastian Krueger" <sebykrueger () gmail ! com>
Date:       2008-10-30 22:43:11
Message-ID: e5600650810301543u6e8d45c9tfb2e1b1da6e773f5 () mail ! gmail ! com
[Download RAW message or body]

Thanks Graeme.

That's exactly what I was looking for.

Regards, Sebatian.

On Thu, Oct 30, 2008 at 11:03 PM, Graeme Fowler <graeme@graemef.net> wrote:
> On Thu, 2008-10-30 at 15:56 +1300, Sebastian Krueger wrote:
>> So I read that if I set the weight of a real server to 0, then no new
>> connections will be accepted. And yet, I definitely am seeing new
>> connections being accepted. Is there anything that I have missed out?
>> Like if I set persistent, then the weighting is ignored?
>
> There's a whole chapter on this in the HOWTO:
>
> http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.persistent_connection.html
>
> Essentially, with persistence any clients reconnecting within the
> persistence timeout will get directed to the same realserver they
> already spoke to *regardless of the weight*. Under persistence, the
> weight only affects completely new connections - that is, connections
> from clients which have no existing persistence template entry.
>
> You can view that by doing "ipvsadm -Lnc" and looking for the entries
> listed as "ERR!" like so:
>
> IP  00:58  ERR!        89.174.115.31:0    0.0.0.5:0          1.2.3.4:0
>
> That's from a running LVS (with the addresses changed) showing a
> persistent entry for a netfilter mark (fwmark) service with mark value 5
> being sent to realserver 1.2.3.4. If the client doesn't return for 58
> seconds, then this template will expire.
>
> If you want to force the behaviour when the weight is set to 0, you need
> to set a sysctl:
>
> net.ipv4.vs.expire_nodest_conn =1
> net.ipv4.vs.expire_quiescent_template =1
>
> The first expires all existing persistent connections when the
> realserver is removed from the pool; the second removes them when the
> weight is set to 0.
>
> Graeme
>
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic