查看 Apache 配置文件,我看到定义了 Prefork 和 Worker MPM。有什么区别,Apache 使用的是哪一个?

最佳答案

Prefork 和 worker 是 apache 提供的两种 MPM。两者都有其优点和缺点。

默认情况下,mpm 是线程安全的 prefork。

Prefork MPM 使用多个子进程,每个子进程有一个线程,每个进程一次处理一个连接。

Worker MPM 使用多个子进程,每个子进程都有多个线程。每个线程一次处理一个连接。

有关更多详细信息,您可以访问 https://httpd.apache.org/docs/2.4/mpm.htmlhttps://httpd.apache.org/docs/2.4/mod/prefork.html

关于Apache Prefork 与 Worker MPM,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13883646/

10-14 01:13