apache proxy to tomcat keep alive confusion apache proxy to tomcat keep alive confusion apache apache

apache proxy to tomcat keep alive confusion


There are (at least) four “keep-alive”s.

  1. HTTP layer keep-alive between client browser and Apache.(Enables multiple client requests in a HTTP/TCP connection. “KeepAlive” directive to configure.)

  2. TCP layer keep-alive between client browser and Apache.(To avoid connection to be closed by firewalls, send empty packet periodically (around 2 hours by default in Linux). I don't know how to configure in Apache.)

  3. AJP layer keep-alive between Apache and Tomcat.(Enables multiple Apache request in a AJP/TCP connection. “max” and “smax” options for “ProxyPass” to configure.)

  4. TCP layer keep-alive between Apache and Tomcat.(Same as 2, but for firewall between Apache and Tomcat. “keepalive” option for “ProxyPass” directive to configure.)

So, your configuration (“KeepAlive off”) might work correctly for firewalls within client and Apache. Use “%X” for “LogFormat” directive to check if keep-alive (of type 1 above) was disabled.

By the way, I think connection closure by firewalls doesn't cause serious problem when “KeepAliveTimeout” is not so large.If you don't have problem (other than warning messages), in my opinion, you might leave as is.