mod_fcgid:多线程的FastCGI现在还是有计划的未来? [英] mod_fcgid: multi‑threaded FastCGI now or in a planned future?
问题描述
据 mod_fcgi是不是的mod_fastcgi 替代和<一个href=\"http://mail-archives.apache.org/mod_mbox/httpd-users/201008.mbox/%3C4C7C286B.6020703@$c$cxterous.com%3E\">Issues与mod_fcgid和多线程FastCGI应用 mod_fcgid
,目的不是要指望FastCGI的服务器能够处理一次多个请求,即没有设计预计FastCGI的服务器是多线程的。
According to "mod_fcgi is NOT a replacement for mod_fastcgi" and "Issues with mod_fcgid and multi-threaded FastCGI application", mod_fcgid
, is not designed to expect FastCGI servers to be able to handle multiple requests at once, i.e. not designed to expect FastCGI servers to be multi‑threaded.
前者说:
他们都支持出版的FastCGI的协议,但
他们如何控制自己的FastCGI的服务器有很大不同。
mod_fcgid迅速消除FastCGI的服务器并启动
新的。
They both support the published "FastCGI" protocol, but how they control their FastCGI servers differs considerably. mod_fcgid quickly eliminates FastCGI servers and starts new ones.
后者说:
似乎mod_fcgid不知道的事实,我的服务器
是多线程和能够处理一个以上的请求。
it seems mod_fcgid isn't aware of the fact that my server is multi-threaded and is able to handle more than one request.
这是在其他只是两个引号,也有一些在其他地方。
That's just two quotes among others, there are some elsewhere.
线程不仅是节省CPU和存储器避免创建新的处理(创建线程已知是比创建过程打火机)的开销,并且可能由硬件或操作系统性能得到缓解;这也是一个逻辑事项,这是不容易减轻:线程属于一个相同的过程,这不是唯一的性能,而且还逻辑,购。过程不能共享可以分享一下线程,进程隔离运行(模工控机,但是这是不一样的)。
Threading is not only about saving CPU and memory avoiding the overhead of creating a new process (creating a thread is known to be lighter than creating a process), and that could be mitigated by hardware or OS performance; this is also a logical matter, which is less easy to mitigate: threads belongs to a same process, that's not only performance, but also logic, ex. process cannot share what threads could share, as process runs in isolation (modulo IPC, but that's not the same).
目前至少为此逻辑原因,多线程的FastCGI服务器的问题得到提升。一个FastCGI的服务器,可容纳上下文(可能是巨大和昂贵的进程间共享),这是全局性的,当它被设计为多线程服务器的所有请求处理程序。派生一个新的进程为每个并发请求不允许以确保一个共同的背景下任意多。
At least for this logical reason, the question of multi‑threaded FastCGI server may be raised. A FastCGI server, may hold a context (which may be big and costly to share between processes) which is global to all request handlers when it is designed as a multi‑threaded server. Forking a new process for each concurrent request does not allow to ensure a common context any‑more.
在上面两个报价仍然为真(一个是日期为2011年,其他2010)?我搜索关于这个专题的网站,也没有找到任何相关信息。如果它仍然是真实的,那么,将它始终是真实的或有对 mod_fcgid
预期的计划,要注意多线程的FastCGI服务器,并接受这些可以设计成处理多个并发请求?
Are the two above quotations still true (one is dated 2011, the other 2010)? I searched the web on the topic, but could not find anything relevant. If it's still true, then, will it always be true or is there an expected plan for mod_fcgid
, to be aware of multi‑threaded FastCGI servers and accept these may be designed to handle multiple concurrent requests?
推荐答案
我不能回答你关于mod_fcgid确切的问题,但是Apache已经移动了,现在在Apache的2.4 preferred方法是使用mod_proxy_fcgi,< A HREF =http://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html相对=nofollow> http://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html
I can't answer your exact questions about mod_fcgid, but Apache has moved on and the preferred method now in Apache 2.4 is to use mod_proxy_fcgi, http://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html.
它做处理多个并发请求。通常情况下,你可能会请求传递给PHP的-FPM处理程序。
It does handle multiple concurrent requests. Typically you might pass requests to the php-fpm handler.
这篇关于mod_fcgid:多线程的FastCGI现在还是有计划的未来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!