What is Apache process model?

随声附和 提交于 2019-12-06 00:24:52

问题


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

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

Does it fork one process for each HTTP request?

Does it have process/thread pool?

Can we config it?

Is there any online doc for such Apache details?


回答1:


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.


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

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.



来源:https://stackoverflow.com/questions/2438543/what-is-apache-process-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!