Re: A little nit

2017-08-06 Thread William A Rowe Jr
+1.

As an alternative... an execute-on-read directive of ProxyBalancerPrecision
or similarly named directive (default 100, but drop or add decimals as
they will)
would let anyone add in or sub out a decimal.

My thought, taking away 1000 (3 decimal) from 2bn really wouldn't be a
hardship on any common config.

On Sat, Aug 5, 2017 at 2:34 PM, Jim Jagielski  wrote:
> Sounds good to me :)
>
>> On Aug 4, 2017, at 9:02 PM, Jim Riggs  wrote:
>>
>>> On 3 Aug 2017, at 08:30, Jim Jagielski  wrote:
>>>
>>> It's just GUI magic... Basically, it will internally take '1.1' and
>>> convert it to 11, 1.0 to 10, etc...
>>
>> If that's the case, I would recommend going 2 decimal places (1.1 = 100, 
>> 1.25 = 125, etc.) to allow using percentages. I could see people wanting to 
>> be able to favor a backend by 25%, for example, by using 1.25. Any more than 
>> 2 decimal places could be rounded to 2.
>>
>


Re: A little nit

2017-08-05 Thread Jim Jagielski
Sounds good to me :)

> On Aug 4, 2017, at 9:02 PM, Jim Riggs  wrote:
> 
>> On 3 Aug 2017, at 08:30, Jim Jagielski  wrote:
>> 
>> It's just GUI magic... Basically, it will internally take '1.1' and
>> convert it to 11, 1.0 to 10, etc...
> 
> If that's the case, I would recommend going 2 decimal places (1.1 = 100, 1.25 
> = 125, etc.) to allow using percentages. I could see people wanting to be 
> able to favor a backend by 25%, for example, by using 1.25. Any more than 2 
> decimal places could be rounded to 2.
> 



Re: A little nit

2017-08-04 Thread Jim Riggs
> On 3 Aug 2017, at 08:30, Jim Jagielski  wrote:
> 
> It's just GUI magic... Basically, it will internally take '1.1' and
> convert it to 11, 1.0 to 10, etc...

If that's the case, I would recommend going 2 decimal places (1.1 = 100, 1.25 = 
125, etc.) to allow using percentages. I could see people wanting to be able to 
favor a backend by 25%, for example, by using 1.25. Any more than 2 decimal 
places could be rounded to 2.



Re: A little nit

2017-08-03 Thread Jim Jagielski
It's just GUI magic... Basically, it will internally take '1.1' and
convert it to 11, 1.0 to 10, etc...

No struct or field changes.

> On Aug 2, 2017, at 3:39 PM, Jim Riggs  wrote:
> 
>> On 2 Aug 2017, at 12:33, Jim Jagielski  wrote:
>> 
>> I'll be adding some code to allow for lbfactors to be
>> single decimal numbers (like 1.1, 2.5, etc...)... People
>> have asked "How do I change it so that machine B is like 10%
>> preferred" and I mention that "Well, you could make one a
>> 10 and the other an 11" but that confuses people. :/
> 
> Is this just some GUI/config magic with the existing int (e.g. shifting 
> decimal places), or are you thinking of changing lbfactor to a FP type in the 
> struct? It would be really nice if lbfactor (and lbstatus?) were floating 
> point. I have had a couple of instances where that would have helped me do 
> something, but I realize that would not an insignificant change to the code 
> or its compatibility.
> 



Re: A little nit

2017-08-02 Thread William A Rowe Jr
On Wed, Aug 2, 2017 at 12:33 PM, Jim Jagielski  wrote:
> I'll be adding some code to allow for lbfactors to be
> single decimal numbers (like 1.1, 2.5, etc...)... People
> have asked "How do I change it so that machine B is like 10%
> preferred" and I mention that "Well, you could make one a
> 10 and the other an 11" but that confuses people. :/

Are we changing the lb member structures to force recompilation of all
non-core lbproviders and consumers in a subsequent 2.4.x release and
introducing more binary breakage?

Or do you envision keeping this in trunk for 2.next, or making this entirely
cosmetic (same intregal struct member, at a multiplication of 10n) in the
proxypass / balancer parameter config logic? Since that config logic is
entirely in core/proxy_balancer, it should be transparent to lbproviders
and consumers.


Re: A little nit

2017-08-02 Thread Jim Riggs
> On 2 Aug 2017, at 12:33, Jim Jagielski  wrote:
> 
> I'll be adding some code to allow for lbfactors to be
> single decimal numbers (like 1.1, 2.5, etc...)... People
> have asked "How do I change it so that machine B is like 10%
> preferred" and I mention that "Well, you could make one a
> 10 and the other an 11" but that confuses people. :/

Is this just some GUI/config magic with the existing int (e.g. shifting decimal 
places), or are you thinking of changing lbfactor to a FP type in the struct? 
It would be really nice if lbfactor (and lbstatus?) were floating point. I have 
had a couple of instances where that would have helped me do something, but I 
realize that would not an insignificant change to the code or its compatibility.