標籤:style http io 使用 ar for div sp cti
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.
It also supports some monitoring in that the web server can ping the application server. Web implementors typically use AJP in a
load-balanced deployment where one or more front-end web servers feed requests into one or more application servers. Sessions
are redirected to the correct application server using a routing mechanism wherein each application server instance gets a name (
called a route). In this scenario the web server functions as a reverse proxy for the application server.
AJP runs in Apache HTTP Server 1.x using the mod_jk plugin and in Apache 2.x using the provided Proxy AJP, mod_proxy and proxy
balancer modules together. Implementations exist for the lighttpd 1.5, nginx, Grizzly 2.1, and the Internet Information Server.
Both the Apache Tomcat servlet container as well as the Jetty servlet container support AJP.
AJP是定向包協議。因為效能原因,使用二進位格式來傳輸可讀性文本。WEB伺服器通過TCP串連和SERVLET容器串連。為了減少進程產生socket的花費,WEB伺服器和SERVLET容器之間嘗試保持持久性的TCP串連,對多個請求/回複迴圈重用一個串連。一旦串連分配給一個特定的請求,在請求處理迴圈結束之前不會在分配。換句話說,在串連上,請求不是多元的。這個是串連兩端的編碼變得容易,雖然這導致在一時刻會有很多串連。 一旦WEB伺服器開啟了一個到SERVLET容器的串連,串連處於空閑狀態或已指派狀態 一旦一個串連被分配給一個特定的請求,在串連上發送的基本請求資訊是高度壓縮的。在這點,SERVLET容器大概準備開始處理請求,當它處理的時候,它能發回下面的資訊給WEB伺服器:(1)SEND_HEADERS、(2)SEND_BODY_CHUNK、(3)GET_BODY_CHUNK、(4)END_RESPONSE ajp協議的設計 http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html
Apache JServ Protocol (AJP)