Apache Multiprocessing Modules (MPMs)
The popularity of Apache web server within the world is unquestionable. System administrator user likes it due to its modular design. On top of this, Apache two introduced Multi-Processing Modules or MPMs that change the essential functionality of the web server.
What is MPMs?
It is a core module of Apache. MPM handle vital core tasks like creating network connections (binding to ports), listening for and acceptive requests from clients (browsers) and creating child processes or threads to handle the requests. As a result of these core tasks should be handled the same method for each request, you’ll be able to only have one MPM loaded at the time. EasyApache four prevents the installation of more one MPM at the same time.
At the end of the startup section, when the configuration has been read, Apache’s general control is passed to a process management module i.e. Multi-Processing Module.
One multiprocessing modules is an interface between the running Apache server and underlying OS. Its main role is to optimize Apache in line with the platform on which the server is running.
MPM Prefork: MPM Prefork an un-oriented model thread, that powerfully resembling the mode of operation of the Apache servers 1.x. This suggests that every child Apache method includes one thread and handles one request at a time. Due to this sort of nature, it consumes additional resources than the oriented threaded MPM i.e. Worker and Event.
Note: Prefork is the default MPM, therefore if there’s no MPM is designated in EasyApache, Prefork are selected by default. However, it’s still the most effective possibility just in case Apache has got to use un-oriented thread-safe libraries like mod_php (DSO), and may be a good alternative if isolation of processes is important.
MPM Worker: This can be an oriented thread. It’s larger flexibility and adapts much better to the demand. it’s significantly higher than the previous model, especially with sure forms of application. It truly turns Apache into a multi-process and multi-threaded web server.As opposite to Prefork, here, every child process will have multiple threads. MPM Worker will handle additional requests while not consuming too much resources.Therefore, it’s usually suggested for high-traffic servers running Apache versions prior to 2.4. However, it suffers because of the incompatibility with non-thread safe libraries. therefore if you would like to run something that isn’t thread safe, then Prefork is the best choice to stay with.