While running performance testes, we have run into an issue when an Apache web server is set in front of a tomcat (ajp in between). When POST http requests were forwarded, we were experiencing the following network sequence: - a first ajp packet containing headers/request was forwarded by Web server to tomcat: body data aren't included in it - Web server would wait for tomcat server to send back an TCP/IP ACK - Web server would then send the second ajp packet containing the POST body data => TCP/IP ACK can take as much as 150ms to be sent (Naggle algorithm) => if tomcat app needs to process post data, it will block this amount of time before being able to process it In proxy_util.c, sockets being created do not have the TCP_NODELAY option set: i have patched the module and performed testes again. Now, web server no longer waits for the tomcat ack to be sent and post data are sent immediately after the first packet. Response time have then been lowered. I will attach the patch to proxy_util.c: it applies to non ftp proxy connections. For ftp, i have found that mod_proxy_ftp.c opens its own sockets and would require a similar patch not provided here.
Created attachment 20497 [details] Patch for modules/proxy/proxy_util.c Hope this will help and don't forget to patch mod_proxy_ftp.c also
In trunk. potential backport for 2.2.x
Proposed for backport as r571936 (http://svn.apache.org/viewvc?rev=571936&view=rev).
Backported to 2.2.x as r572419 (http://svn.apache.org/viewvc?rev=572419&view=rev).