Say that MaxClients is 1024. Normally, with keepalives turned on, all 1024 of these threads (or proc's) can be busy doing keep alives which means that they could just be sitting around waiting for them to time out. What I'd like to do is something like "GlobalKeepAliveCount 256." This would mean that at most 256 threads would be busy with keep alives at any time. (This idea is borrowed from another web server.)
Here's what I was thinking:
-Have a global count for keepalives in shared memory (or scoreboard)
-After create connection, check this variable, if less than max, then process normally, increment variable, and register a cleanup on connection pool. This cleanup will decrement the variable.
Thoughts?
-- Brian Akins Senior Systems Engineer CNN Internet Technologies