Apache JServ Protocol

 

 

ajp_百度百科 https://baike.baidu.com/item/ajp/1187933nginx

 

AJP(Apache JServ Protocol)是定向包協議。由於性能緣由,使用 二進制格式來傳輸可讀性文本。 WEB服務器經過  TCP 鏈接 和  SERVLET容器鏈接。
 
外文名
Apache JServ Protocol
簡    稱
ajp
實    質
定向包協議
做    用
使用二進制格式來傳輸可讀性文本
AJP是定向包協議。由於性能緣由,使用 二進制格式來傳輸可讀性文本。 WEB服務器經過 TCP鏈接和 SERVLET容器鏈接。爲了減小進程生成socket的花費,WEB服務器和SERVLET容器之間嘗試保持持久性的TCP鏈接,對多個請求/回覆循環重用一個鏈接。一旦鏈接分配給一個特定的請求,在請求處理循環結束以前不會再分配。換句話說,在鏈接上,請求不是多元的。這個使鏈接兩端的編碼變得容易,雖然這致使在一時刻會有不少鏈接。
一旦WEB服務器打開了一個到SERVLET容器的鏈接,鏈接處於下面的狀態:
◆ 空閒
這個鏈接上沒有處理的請求。
◆ 已分派
鏈接正在處理特定的請求。
一旦一個鏈接被分配給一個特定的請求,在鏈接上發送的基本請求信息是高度壓縮的。在這點, SERVLET容器大概準備開始處理請求,當它處理的時候,它能發回下面的信息給 WEB服務器
◆ SEND_HEADERS
發送一組頭到瀏覽器。
◆ SEND_BODY_CHUNK
發送一塊主體數據到瀏覽器。
◆ GET_BODY_CHUNK
從請求得到下一個數據若是尚未所有傳輸完,若是請求內容的包長度很是大或者長度不肯定,這是很是必要的。例如上載文件。注意這和HTTP的 塊傳輸沒有關聯。
◆ END_RESPONSE
結束請求處理循環。
 
 
 

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.web

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 areverse proxy for the application server. Lastly, AJP supports request attributes which, when populated with environment-specific settings in the reverse proxy, provides for secure communication between the reverse proxy and application server.[1][2]瀏覽器

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 not-yet-released lighttpd version 1.5,[3]nginx,[4] Grizzly 2.1,[5] and the Internet Information Server.[6]服務器

The Apache Tomcat and JBoss AS/WildFly servlet containers support AJP.app

相關文章
相關標籤/搜索