httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <>
Subject Re: Global keepalive count possible?
Date Mon, 24 Nov 2003 14:18:24 GMT
Brian Akins wrote:

> I have been thinking about this and just wanted to see if it were possible.
> 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?

Biased answer follows :-)

If we're talking 2.0, I'd rather implement an event loop to prevent tying up threads on ka
reads. I've posted 
a patch that explores some of the issues a year or so ago. Probably should dig it up and reimplement
it; I may 
be able to get it right this time ;-)


View raw message