FastCGI or SCGI

本文探讨了FastCGI和SCGI这两种技术如何解决CGI的性能问题。通过创建长期运行的后台进程来实现与Web服务器的独立交互,使得它们能够使用包括Python在内的多种编程语言进行开发。尽管SCGI在概念上更简单,但由于其支持有限,大多数情况下人们会选择使用功能相似的FastCGI。

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

http://docs.python.org/howto/webservers.html#fastcgi-and-scgi

FastCGI and SCGI try to solve the performance problem of CGI in another way. Instead of embedding the interpreter into the web server, they create long-running background processes. There is still a module in the web server which makes it possible for the web server to “speak” with the background process. As the background process is independent of the server, it can be written in any language, including Python. The language just needs to have a library which handles the communication with the webserver.

The difference between FastCGI and SCGI is very small , as SCGI is essentially just a “simpler FastCGI”. As the web server support for SCGI is limited, most people use FastCGI instead, which works the same way. Almost everything that applies to SCGI also applies to FastCGI as well , so we’ll only cover the latter.

These days, FastCGI is never used directly. Just like mod_python, it is only used for the deployment of WSGI applications.

See also

    * FastCGI, SCGI, and Apache: Background and Future is a discussion on why the concept of FastCGI and SCGI is better that that of mod_python.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值