什么是Apache进程模型?

问题描述:

我一直在谷歌上搜索了一段时间这个问题,但没有得到回应。什么是Apache进程模型?

I have been googling this question for some time but got no answers. What's the Apache process model?

通过流程模型,我的意思是Apache如何管理进程或线程处理HTTP请求。​​

By process model, I mean how Apache manage process or thread to handling HTTP request.

这是否为叉每个HTTP请求一个进程?

Does it fork one process for each HTTP request?

是否有进程/线程池?

我们可以配置它?

有没有在线文档这样的Apache细节?

Is there any online doc for such Apache details?

这取决于你的系统和配置上:看的核心功能和多处理模块:你可以使用,例如:

This depends on your system and configuration : see Core Features and Multi-Processing Modules : you could use, for instance :

  • Apache MPM winnt on windows -- that one uses threads
  • Or Apache MPM prefork -- that one uses processes
  • Or even Apache MPM worker -- which uses both several processes and threads.

结果
引用最后一个页面,Apache的MPM工人:


Quoting the page of the last one, Apache MPM worker :

这多处理模块(MPM)
  实现了混合多处理
  多线程
服务器。结果使用
  线程服务请求时,它能够
  服务于大量的请求
  用较少的系统资源比
  基于进程的服务器。结果,然而,它
  保留了大部分的稳定性
  通过保持基于流程的服务器
  提供多个进程,每个
  有许多线程。

This Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server.
By using threads to serve requests, it is able to serve a large number of requests with fewer system resources than a process-based server.
However, it retains much of the stability of a process-based server by keeping multiple processes available, each with many threads.