You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by jean-frederic clere <jf...@gmail.com> on 2024/02/15 16:11:51 UTC
Re: age in proxy_balancer_method
On 12/21/23 19:32, Rainer Jung wrote:
> I guess it could be like this: when Mladen originally implemented the by
> requests load balancing method in mod_jk he used the count and subtract
> method for the counters. He then ported this to mod_proxy_balancer and I
> think it is still, how by requests counting woorks there.
>
> There are pros and cons, e.g. in case a worker goes down for some time.
> A bit later we switched in mod_jk to a count and divide, where division
> by 2 was done roughly every 60 seconds (configurable).
I have looked to different solutions: The most easy is to add age=n
parameter to the balancer definition and divide the transferred, read
and elected by 2 every n seconds for the workers.
Other logic would be to store those values and reset them if they don't
change.
The busy don't need any aging ;-)
I will prepare a PR for first review tomorrow.
>
> I think the idea of the age method was roughly, that you could implement
> a balanvcer method, that registers a mod_watchdog task, that regularly
> ages the balancing counters. Aging because you want to give the past a
> smaller influence on the balancing decision than the more recent activity.
>
> I hope that's understandable and maybe Jim remembers something similar
> to that.
>
> Best regards,
>
> Rainer
>
> Am 21.12.23 um 08:23 schrieb jean-frederic clere:
>> On 12/20/23 21:22, Jim Jagielski wrote:
>>> I'll have to go back through my notes... I do recall adding fields
>>> that although
>>> were not being used at the time, were _going to be used_ as some
>>> point, and
>>> I didn't want to have to worry about ABI compatibility.
>>
>> Cool I will wait before implementing something that breaks your design
>> ;-)
>>
>>>
>>>> On Dec 14, 2023, at 8:27 AM, jean-frederic clere <jf...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Any examples or docs about:
>>>> apr_status_t (*age)(proxy_balancer *balancer, server_rec *s);
>>>>
>>>> In struct proxy_balancer_method?
>>>>
>>>> --
>>>> Cheers
>>>>
>>>> Jean-Frederic
--
Cheers
Jean-Frederic