2.2. AJP Connector

The AJP (Apache JServ Protocol) connector is typically used when a web server, such as Apache web server, is placed in front of the platform. Since AJP is its own binary protocol, configuration is different, but shares quite a bit of commonality in what can be configured with the Java I/O Endpoint. The following configuration parameters will be discussed:
  • maxThreads
  • minSpareThreads
Two of these parameters - maxThreads and minSpareThreads - are common with the Java I/O Connector. The AJP protocol also has a keep alive parameter but its default behavior is to always keep connections open, which avoids the overhead of setting up and tearing down connections. A common configuration is to have the front-end web server in a DMZ, with a firewall allowing only incoming HTTP(S) to the web server, and another firewall between the web server and the platform, allowing only AJP traffic. Maintaining persistent connections in such a configuration is more efficient than the cost of constantly connecting and disconnecting the various components. Firewall configuration is another factor to consider because some firewalls close connections when no traffic has passed over a connection in a certain period.
The same considerations for the AJP connector apply as for the Java I/O connector. The thread pool is monitored in the same way in the administration console. The values set are also set in the same configuration file: server.xml. Below is an extract from server.xml in which both maxThreads and minSpareThreads have been configured:
<!-- A AJP 1.3 Connector on port 8009 -->
      redirectPort="8443" maxThreads="3000" minSpareThreads="2000" />
   <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"