On 2/12/25 2:21 PM, Yann Ylavic wrote:
On Wed, Feb 12, 2025 at 12:38 PM Yann Ylavic <ylavic....@gmail.com> wrote:

However it seems that [4] will cause worker->s->is_address_reusable =
0 in [3] (i.e. disable DNS reuse altogether) which is not really
expected, and would explain why the pool is cleared in
connection_cleanup().

[3] 
https://github.com/apache/httpd/blob/2.4.63/modules/proxy/proxy_util.c#L1989-L2034
[4] 
https://github.com/apache/httpd/blob/2.4.63/modules/proxy/proxy_util.c#L2140-L2159

I think we need something like the attached patch to not let the
->disablereuse=1 in [4] (because of a $-substitution including outside
hostname[:port]) force ->is_address_reusable=0 in [3] implicitly.

The rationale is that before 2.4.59 ->is_address_reusable and
->disablereuse were kind of the same thing (the former, not
configurable, was set from the latter), but since 2.4.59
->is_address_reusable is about the reusability of backend's DNS
address (and lifetime, both deduced from the address_ttl= parameter)
while ->disablereuse is about the reusability of the
connections/sockets only.

the mod_cluster code does:
worker->s->is_address_reusable = 1;
and doesn't care about  worker->s->disablereuse...

Except we probably still want to disable address reuse when
disablereuse=on explicitly (for compatibility), but not for the
implicit case [4], which is what this patch does.
Thoughts?

Jean-Frederic, I don't think it addresses your issue because you
probably have enablereuse=on already if your ProxyPassMatch used to
reuse connections before 2.4.59? Connection reuse for ProxyPassMatch
is possible since 2.4.47, but has always depended on enablereuse=on.
If you don't use ProxyPassMatch with a $-substitution I don't see why
something changed in 2.4.59 though..

I guess I have to fix mod_cluster, thanks for help.


--
Cheers

Jean-Frederic

Reply via email to