httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: Speeding up mod_proxy_balancer on Windows
Date Thu, 09 Oct 2008 22:28:43 GMT

On 10/09/2008 11:50 PM, Jess Holle wrote:
> P.S. Yes, I know this approach only has any hope of working when Apache
> and the proxy backends are on the same host.
> Jess Holle wrote:
>> I had previously discovered that mod_proxy_balancer takes over 1
>> second on Windows to determine that nothing is listening on the target
>> port.  This becomes problematic if you are balancing over a sparsely
>> populated set of proxy ports.
>> A Windows guru here found the Windows GetTcpTable which would appear
>> to offer a quicker way to determine a port's status -- whereas doing
>> the obvious thing and attempting to connect takes over a second to fail.
>> I'd like to experiment with using this API to address this issue upon
>> attempted formation of the first connection for a given worker one is
>> balancing over.  Can anyone suggest where I should look to do add such
>> a call?  Eventually this should presumably be an APR-level thing, but
>> in the short term I'm just looking for where I can experiment with
>> inserting it in an #ifdef in the proxy code -- and getting a little
>> lost here, unfortunately.

Did you check whether the currently running thread "proxy_ajp connect timeout fix."
does fix your issue on Windows?
If httpd and the backends are running on the same machine this shouldn't take
a second. The connect call should return immediately with an error code indicating
that the connection was refused (if the port is down). If not is it possible that there
is a local firewall that causes this trouble?



View raw message