I am not familiar with internals of Apache so I am just wondering if Apache is blocking I/O or non-blocking IO?
A:
It forks a process for each connection, so it probably is blocking (unless it watches for timeout on the same thread as the socket i/o?).
To be sure you should probably look for socket creation calls in the source, and follow accesses to the socket descriptors... I'm not even sure if Apache has to do the forking mode, maybe it has an asynchronous mode too.
Edit
Right, there are a bunch of "Multi-Processing Modules", which decide how to handle multiple HTTP requests.
Longpoke
2010-05-25 02:49:26
Read the above comment - forking for each connection is unreasonable and not performance-wise saying the least.
Poni
2010-05-25 03:26:05
@Poni True, looks like the modern options just let you specify a max number of threads (or children), each of which will do a certain amount of jobs asynchronously.
Longpoke
2010-05-25 04:29:01
If it is non-blocking IO, what's the major difference of concurrency ability between apache and nginx?
Mickey Shine
2010-05-26 03:49:13