HTTP Vs AJP protocol

Http protocol is expensive in terms of band width – it is an ascii text protocol with words like “POST” and phrases like “Content-type:” taking  more bandwidth than is really needed, and having to be interpreted at destination too.

AJP (Apache Jserv Protocol) is basically a binary protocol.Ajp carries the same information as http but in a binary format. The request method – GET or POST – is reduced to a single byte, and each of the additional headers are reduced to 2 bytes – which is  about a fifth of the size of the http packet.so ajp is lighter and faster than http.

Ajp is uesd method for a web server to communicate with an associated application server.

AJP is particularly used for “Load Balancing.” This is where one server distributes incoming traffic among several application servers, sharing the load equally.

This entry was posted in Interview, Tomcat. Bookmark the permalink.

Leave a comment