Re: age in proxy_balancer_method

2024-02-15 Thread jean-frederic clere

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



Re: age in proxy_balancer_method

2024-01-08 Thread jean-frederic clere

On 1/2/24 14:47, Jim Jagielski wrote:

Yeah, that sounds about right. I'd say that whatever changes need (or should 
be) made are fine


Thanks I will keep experimenting ;-)




On Dec 21, 2023, at 1:32 PM, 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 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  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



Re: age in proxy_balancer_method

2024-01-02 Thread Jim Jagielski
Yeah, that sounds about right. I'd say that whatever changes need (or should 
be) made are fine

> On Dec 21, 2023, at 1:32 PM, 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 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  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



Re: age in proxy_balancer_method

2023-12-21 Thread Rainer Jung
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 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  
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


Re: age in proxy_balancer_method

2023-12-20 Thread 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  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



Re: age in proxy_balancer_method

2023-12-20 Thread Jim Jagielski
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.

> On Dec 14, 2023, at 8:27 AM, jean-frederic clere  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



age in proxy_balancer_method

2023-12-14 Thread jean-frederic clere

Hi,

Any examples or docs about:
apr_status_t (*age)(proxy_balancer *balancer, server_rec *s);

In struct proxy_balancer_method?

--
Cheers

Jean-Frederic