httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <>
Subject Pinging proxy backends
Date Wed, 17 Sep 2008 12:36:37 GMT
I need to add background pinging of proxy backends to Apache 2.2.  [I'll 
contribute code back, but may or may not be able to get it into a form 
that is acceptable for inclusion in Apache.]

Unfortunately, it is clear to me I do not have nearly the familiarity 
with the Apache APIs to make this possible in a reasonable time period.  
My C skills are a bit rusty as well, but I mainly have an API 
knowledge/comprehension issue at this point.

I can create a background thread for this easily enough (thanks to 
reading through code by Mladen Turk), but otherwise I'm struggling.

Can anyone give me some pointers on / code snippets for some basic 
pieces?  For instance, how might I initiate a backend request on my own 
(rather than as part of normal request forwarding in mod_proxy)? 

What I'm really targeting is mod_proxy_ajp, so I'd really actually like 
to figure out is how to do a cping in this case rather than any sort of 
URL request (or should we just have a cping be a special ajp:// URL 

I also need to figure out the same thing for the mod_jk IIS/Tomcat 
connector, unfortunately...

As to why all this bother, as per an e-mail to this group some time 
back, I need to load balance over a sparsely populated range of ports.  
In other words, I'll only have a Tomcat actually running on a few of 
these ports at any given time.  This actually works nicely on Linux, for 
instance, as things stand.  Each dead port rejects requests almost 
instantaneously.  On Windows, however, this can take over a second -- so 
whenever the worker retry interval expires a foreground request can end 
up trying all the dead ports and being delayed by <# of dead ports> 
seconds!  If anyone has any ideas as to how to fix this issue with 
Windows instead, I am /all/ ears.  I'd rather just keep the code simple 
and have reasonable TCP/IP stack behavior -- but I may just be dreaming 
in this regard.

Jess Holle

View raw message