几个常用协议的定义和推荐组织
What is Mongrel?
Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, Camping, and IOWA frameworks.
The Simple Common Gateway Interface (SCGI) is a protocol for applications to interface with HTTP servers, an alternative to the CGI protocol. It is similar to FastCGI but is designed to be easier to implement.
Request header的格式非常简单,如下
[quote]
headers ::= header*
header ::= name NUL value NUL
name ::= notnull+
value ::= notnull+
notnull ::= <01> | <02> | <03> | ... | <ff>
NUL = <00>
[/quote]
FastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface (CGI); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once.
The Apache JServe Protocol (AJP) is a binary protocol that can conduit inbound requests from a web server through to an application server that sits behind the web server. It also supports some monitoring in terms of the web server being able to ping the application server. AJP is typically used 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 which is called a route.
Protocol preferred by binary protocol keep-alive
HTTP mongrel no yes
SCGI WSGI (python) not really no
FastCGI PHP, rails yes yes
AJP13 Tomcat yes yes yes
What is Mongrel?
Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, Camping, and IOWA frameworks.
The Simple Common Gateway Interface (SCGI) is a protocol for applications to interface with HTTP servers, an alternative to the CGI protocol. It is similar to FastCGI but is designed to be easier to implement.
Request header的格式非常简单,如下
[quote]
headers ::= header*
header ::= name NUL value NUL
name ::= notnull+
value ::= notnull+
notnull ::= <01> | <02> | <03> | ... | <ff>
NUL = <00>
[/quote]
FastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface (CGI); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once.
The Apache JServe Protocol (AJP) is a binary protocol that can conduit inbound requests from a web server through to an application server that sits behind the web server. It also supports some monitoring in terms of the web server being able to ping the application server. AJP is typically used 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 which is called a route.