httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: mod_proxy_ajp or mod_proxy_http?
Date Fri, 15 Jun 2007 03:07:17 GMT

"Plüm, Rüdiger, VF-Group" <ruediger.pluem@vodafone.com> wrote in message 
news:3B21A253728EA247A10A692547A271538DCB96@EITO-MBX03.internal.vodafone.com...


>> -----Ursprüngliche Nachricht-----
>> Von: Bill Stoddard
>> Gesendet: Donnerstag, 14. Juni 2007 15:28
>> An: dev@httpd.apache.org
>> Betreff: mod_proxy_ajp or mod_proxy_http?
>>
>>
>> I'm trying to understand why mod_proxy_ajp exists and what it
>> provides
>> that mod_proxy_http doesn't.
>>
>> ajp13 is a binary protocol which should make the ajp13 tomcat
>> connector
>> a bit more efficient than the http11 connector; an incremental
>> performance improvement. obtained at the expense of added complexity.
>> Does mod_proxy_ajp provide any other function not available in
>> mod_proxy_http? I'm trying to decide which horse to put my
>> chips on :-)
>
>I personally prefer mod_proxy_ajp in this case, because
>
>- It avoids the need to parse the request in Tomcat again. This also
>  increases the bar for proxy attacks like HTTP smuggling.
>
>- The persistent connection handling currently seems to be better compared
>  to keepalive connections with HTTP. There are still some nasty race 
> conditions
>  when the backend closes the connection just as we send our request to it.
>
>- There is a basic health check for the backend *before* sending the 
>request
>  (CPING/CPONG).
>
>AFAIK the following drawbacks on Tomcat side:
>
>- No NIO AJP connector (but you can use the APR version of the connector).

Not strictly true, it's just that it's never graduated from "experimental" 
due to lack of user interest.  Unfortunately, it got dropped from the build 
(I've just fixed that), so you need to apply R547503 to get it.  If you do 
(w/o the APR  native binary installed):
   <Connector protocol="AJP/1.3" port="0"
         channelNioSocket.port="8009"
         channelNioSocket.bufferSize="16384"
         channelNioSocket.maxThreads="125"
         channelNioSocket.minSpareThreads="10"
         channelNioSocket.maxSpareThreads="50"
         />

you will get the experimental NIO/AJP Connector.  Of course, most of the 
attributes are optional (but if you can spare the memory, the bufferSize 
improves performance a lot if you have a lot of POST requests).


>- No usage of sendfile with the AJP connector.
>
>Regards
>
>Rüdiger





Mime
View raw message