AJP,SCGI,FastCGI

本文介绍了几种常用的Web协议,包括HTTP、SCGI、FastCGI和AJP13等,并对比了它们的特点及适用场景。同时,对Mongrel、FastCGI等服务器组件进行了简要说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

几个常用协议的定义和推荐组织

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值