On Wed, Sep 3, 2008 at 4:38 AM, Willy Tarreau <w#1wt.eu> wrote:
> Hi Jeffrey,
>
> On Sun, Aug 24, 2008 at 05:37:21PM +0800, Jeffrey 'jf' Lim wrote:
>> I'm in the process of setting up one haproxy instance now, and I find
>> the following acl option useful. I'm not too sure why this option has
>> not been available before, but I find this useful for my own usage, so
>> I'm submitting this patch in the hope that it will be useful as well.
>
> That's a very nice initiative.
>
sure :)
>> The basic idea is to be able to measure the available connection slots
>> still available (connection, + queue) - anything beyond that can be
>> redirected to a different backend. 'nbsrvconnslots' = number of
>> available server connection slots, + number of available server queue
>> slots.
>
> I like the idea, it clearly makes sense...
>
i'm glad u find it so too!!!
>> In the case where we encounter srv maxconn = 0, or srv maxqueue
>> = 0 (in which case we dont need to care about nbsrvconnslots) the
>> value you get is -999 (let me know if you think another value is
>> better).
>
> ...but I hate such magic values :-) Generally we use zero for unlimited
> (eg: maxconn) but when that's not possible, we set to -1 but check
> for <0.
>
magic values? :) yeah, tell me about it. I was just wondering about that... Will set it to -1 then
>> Note also that this code does not take care of dynamic
>> connections at this point in time.
>>
>> The reason why I'm using this new acl (as opposed to 'nbsrv') is that
>> 'nbsrv' only measures servers that are actually *down*. Whereas this
>> other acl is more fine-grained, and looks into the number of conn
>> slots available as well.
>>
>> Comments are welcome.
>
> I would like the name to get shorter (eg: "connslots", "freeconns" or
> "connleft", you get the idea).
> I will ask you to add an entry for your
> keyword in the configuration manual with a few lines of a use example
> (where/when this would be useful), and I have no problem to merge it.
>
yup. Saw ur comment about this in another email in the archives - but sort of wanted to get an opinion first, before i work on the help text. Will get that done pretty soon. Probably tonight.
thanks for the comments and note,
-jf
Received on 2008/09/03 05:48
This archive was generated by hypermail 2.2.0 : 2008/09/03 06:01 CEST