. Mpm:multi-processing module multi-processing modules with support for three I/O models: prefork,worker,event
. prefork: Multi-process I/O model, each process responds to a request, the default model
One main process: Generate and Reclaim n child processes, create sockets, do not respond to requests
Multiple child processes: The work process, each child process processing a request, the system initially, the pre-generation of several idle processes, waiting for the request, maximum no more than 1024
The child process is prepared to wait for the user's access, and the system calls the fork function
Prefork with the request of the corresponding user of a process
. worker: multiplexed multi-process I/O model, multi-process multithreaded, IIS uses this model
One main process: generate M child processes, each of which is responsible for producing n threads, each of which responds to a request, and the concurrent response request: M*n
The disadvantage is that when a thread is affected, all threads of that child process are affected
. Event: Incident-driven model (variant of worker model)
A main process: generate M child processes, each process responds to n requests directly, concurrent response requests: M*n, there are specialized threads to manage these keep-alive types of threads, (here is where the worker is improved) when there is a real request, the request is passed to the service thread, after execution is complete, Also allows for release, which enhances the request processing capability in high concurrency scenarios
CENTOS6 Default Httpd-2.2:event Beta
Centos7 Default Httpd-2.4:event stable version
Prefork MPM: Process corresponding request
650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6943703-9484a3ce392713ea.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" height:auto;vertical-align:middle;border:0px; "alt=" 1240 "/>
Worker MPM: Thread responds to user's request
650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6943703-6746c1f65bd40df6.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" height:auto;vertical-align:middle;border:0px; "alt=" 1240 "/>
Event MPM: A more regulated model than the worker
650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6943703-4ff3a554d01f81ed.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" height:auto;vertical-align:middle;border:0px; "alt=" 1240 "/>
Process role, where the worker is the thread's meaning
650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6943703-d553d879ecf349a6.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" height:auto;vertical-align:middle;border:0px; "alt=" 1240 "/>
This article is from the "Sunshine Ops" blog, please be sure to keep this source http://ghbsunny.blog.51cto.com/7759574/1970523
HTTP MPM Mode of operation