httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <>
Subject Re: [users@httpd] mod_proxy and DNS resolving
Date Fri, 27 May 2016 22:31:57 GMT
Hi Luca,

On Mon, May 23, 2016 at 2:21 PM, Luca Toscano <> wrote:
> I replied to the comment that you pointed out with Jim's answer and I
> updated the trunk documentation with a note about DNS resolution:
> HTML diff only:

I don't think this is correct.
When disablereuse is true (including the default workers), the DNS
resolution occurs for each connection.
But when mod_proxy is reusing connections (including addresses), each
worker/backend address is resolved only once per child process, and
reused for all further connections (until the child is recycled).
AIUI, this is not related to the TTL.

>From ap_proxy_determine_connection():
                 * Worker can have the single constant backend adress.
                 * The single DNS lookup is used once per worker.
                 * If dynamic change is needed then set the addr to NULL
                 * inside dynamic config to force the lookup.
AFAICT, nothing sets "addr to NULL" anywhere in httpd, that would be
racy anyway.

There is indeed a worker 'is_address_reusable' flag distinct from
'disablereuse', but it is not exposed to the admin and seems to be
internally mapped to 'disablereuse'.

I have a patch which introduces 'addressTTL' if one is interested, but
it's not that simple because it addresses the race locklessly (and
leaklessly :), thus with refcounting, address pool...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message