Why do you have a working mode?
More efficient support of different platforms, better for the special requirements of the site customization.
For example, sites that require more scalability can choose to use a thread's MPM, worker or a event site that requires reliability or is compatible with older software prefork .
How many working modes are there?
| Perfork |
Process handles each request in the same way
Pre-derived, suitable for systems without thread-safe libraries that need to avoid thread-compatibility issues. A situation where each request is independent of each other. |
| Worker |
Multithreaded multi-process for processing requests
Multithreading: Handling massive requests, system resource overhead is small; multi-process: stability
The number of threads that each process can have is fixed. The server increases or decreases the number of processes depending on the load. A separate control process (parent process) is responsible for the creation of child processes. Each child process can establish a threadsperchild number of service threads and a listener thread that listens to the access request and passes it to the service thread for processing and answering. |
| Event |
Detach the service process from the connection. The event MPM approach is most effective when the server is processing fast and has a very high click-through rate, the number of threads available is the critical resource limit. |
| NetWare |
NetWare |
| Os/2 |
Os/2 |
| WinNT |
Windows |
build mpm Static module :./configure--with-mpm=prefork
View working mode httpd–l, apachectl-l
[[email protected] bin] #Compiled in modules:
Core.c
Mod_so.c
Http_core.c
WORKER.C # Worker Mode of operation
Apache Working mode