Multiple Process Modules Page 2
The Multiple Process Module (MPM) does the work for each platform or architecture by distributing many requests for Web pages between processes, threads, and whatever other organizational units the MPM's author has designed. In Windows' case, the new "winnt" MPM introduced the concept of AcceptEx, which is the mechanism used by MS's own IIS server.
AcceptEx is a huge optimization win, because this one TCP/IP socket call:
- Accepts one connection to the server
- Discovers the addresses of the client and this server
- Collects the first part of the request (including some or all of the request headers and POST data)
This all happens before Apache 2.0 even finds out the request is pending, and the answers to all of the questions Apache must ask are returned with a single query, improving the initial response time to make it more than ten times faster than Apache 1.3.
Apache 2.0's "winnt" MPM is a threaded architecture, just as Apache version 1.3 for Windows is. However, threaded MPMs on Unix are new to Apache 2.0. This means _all_ module authors must now pay attention to "thread safety," an issue neglected by some Apache 1.3 module authors (who were principally or only interested in Unix).
In the past, when one attempted to build such modules on Windows, the modules might crash and burn, or simply show obscure bugs that Unix users could not reproduce. Even mod_rewrite and other core modules contained latent bugs related to threading. Modperl would serve only one request in Apache 1.3 because it was designed for multiple processes, rather than threads. Now that everyone is playing by the same rulebook, Apache 2.0 modules are for the most part of similar quality on Unix and Windows.