Pivotal Knowledge Base

Follow

Benefits of JkOptions +DisableReuse over the standard connection pool mechanism (2007783)

Benefits of JkOptions +DisableReuse over the standard connection pool mechanism (2007783)

Symptoms

  • Problems keeping connections alive between Apache HTTP Server and Tomcat.
  • When setting up mod_jk to connect to the Tomcat connection pool, JkOptions +DisableReuse is recommended

Purpose

This article provides information about the benefits of JkOptions +DisableReuse over the standard connection pool mechanism.

Resolution

The DisableReuse JkOption is recommended because of how mod_jk handles connections. Typically the DisableReuse option is recommended when there are issues with keeping a connection alive (for example, a firewall silently dropping connections).

mod_jk has these built in health checks:

connect_timeout
prepost_timeout

Both health checks send a PING to Tomcat. Tomcat responds with a PONG, at which point the connection is considered healthy and used.

In contrast, the DisableReuse option closes each connection after it has been used. This means two things:

  • Establishing a new TCP connection is equally fast, if not faster, than PING/PONG, as it is handled at the kernel TCP implementation
  • Threads on the Tomcat server are made available to handle requests from other httpd workers, or possibly other httpd servers

When using a connection pool with multiple httpd front ends, you must carefully balance connection pool settings and thread counts on the Tomcat server. The DisableReuse JkOptions setting bypasses the need to balance the connection pool and thread count settings.

Impact/Risks

VMware is not aware of a scenario where the creation and break down of TCP sessions causes any performance concerns. Using the DisableReuse setting results in a cleaner and efficient system, with fewer threads being taken up on the Tomcat side, and no risk of them waiting on dead connections.
©VMware 2013

Comments

Powered by Zendesk