What is AJP protocol used for?

ajp
user1745356 picture user1745356 · Feb 13, 2014 · Viewed 53k times · Source

Okay, I've read a small article on wiki which explained AJP a bit. Basically this protocol is used for communication between Apache and Application server. But why may one need it in the first place? Why not use just plain http?

Answer

Ian McGowan picture Ian McGowan · Dec 9, 2014

More specifically, and not really covered in that ehow article, there's some non-trivial overhead to parsing http headers on requests and creating them on responses. If you are fronting your app server with a web proxy server, AJP allows you to skip that extra parsing and just pass efficient binary representations of the headers between the proxy server and the app server. There are other benefits with things like simple connection pools and tight integration if you use apache/mod_jk to tomcat.

Client <- http/s-> Proxy <- http/s -> App

vs

Client <- http/s-> Proxy <- AJP -> App