HTTP MPM Mode of operation

Source: Internet
Author: User

. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.