Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is AJP protocol used for?

Tags:

ajp

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?

like image 537
user1745356 Avatar asked Feb 13 '14 14:02

user1745356


People also ask

Does AJP use TCP?

Overview of the protocol The ajp13 protocol is packet-oriented. A binary format was presumably chosen over the more readable plain text for reasons of performance. The web server communicates with the servlet container over TCP connections.

What is AJP service?

The Apache JServ Protocol (AJP) is a binary protocol that can proxy inbound requests from a web server through to an application server that sits behind the web server.

Is AJP protocol encrypted?

When using AJP you cannot do anything to ensure it is secure. It isn't. There is no SSL version.

What is the default AJP port?

The default value is 8192. The TCP port number on which this Connector will create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address.


1 Answers

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

like image 166
Ian McGowan Avatar answered Oct 02 '22 00:10

Ian McGowan