AJP is NOT recommended. Use HTTP and mod_proxy instead (see above)
This statement needs more explanation. It looks like an official statement from the Jetty team but since this is a wiki it could be just personal experience from a reader. AJP seems to be the protocol of choice when connecting servlet containers with Apache. Why is it not recommended?
Are there stability issues?
Are there performance issues?
Is the AJP connector not supported?
Is this based on personal experience of a reader?
AJP is not recommended for a number of reasons:
- historically mod_jk has had intermittent maintenance and bad versioning practises. This make it difficult to select a known good version that is fully compatible with the AJP connector you are running.
- The mod_proxy plugin is more actively maintained and the mod_proxy_balancer supports a richer set of options for load balancing.
- Jetty is optimized to deal with the text based HTTP protocol and the servlet API also exposes the text nature of HTTP to the application. There are no measurable benefits of using apache to convert text HTTP to the binary AJP protocol, only for jetty to have to convert back. Some tests have shown 15% more throughput with mod_proxy than with mod_ajp
- With cometd style applications, neither mod_jk nor mod_proxy scale well. However, mod_proxy does make greater use of connections, so it is a better choice for moderate comet load. For full comet scaling, either jetty should be directly exposed to the internet or an async load balancer like nginx should be used.
- Note however that AJP is still full supported by the jetty team and we will strive to fix any issues found.
The Jetty AJP connector.
To use AJP with either mod_jk or mod_proxy_ajp, Jetty needs to be configured with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately and existing jetty.xml file may be modified with: