httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Long <bl...@uiuc.edu>
Subject Re: fork free
Date Sun, 23 Apr 1995 08:33:54 GMT
Last time, Brian Behlendorf uttered the following other thing:
> 
> On Sat, 22 Apr 1995, Rob Hartill wrote:
> > The latest fork-free patch is in /patches/for_Apache_0.6.2/
> > 
> > Things we need to fix...
> > 
> > There's a potential problem in the current setup, which I think
> > the NCSA approach will suffer from too, it should be possible for
> > a trouble maker to open N connections, and grab the attention of
> > all N child processes. He can then hold these N connections open
> > for TIMEOUT seconds, and thus block all other connections to the
> > server.
> 
> At the very least, if all children are busy, there should be at least one 
> more process listening on the port that sends a 503 response.  

The things we tried in alpha (in order):
	have a special child that always returns a "we're busy" and hand
	  the connections over the limit to it
	a queue for connections that have come in (and been accepted)
	let the OS queue it by not accepting it
	fallback to 1.3 behaviour

The first was a problem in general (scripts and the like could cause a 
server to be perpetually busy without really being busy).
The second made response time unacceptable (and SunOS only allows 64
open file descriptors)
The third was no better than the second, plus this is one of the major
problems with the server in general (5 is the hard limit for the queue
on most systems (at least older systems))

Hence the reason for the fallback

My personal idea was to allow infinite number (or at least a large number)
of children be created, and then have them timeout and die after 5 minutes
if they haven't been used.  This way a server "responds" to increased 
demand, and yet relinquishes the resources when it slows down.  
Unfortunately, I started coding in Unix about the same time I started 
coding this, and didn't know how to do it, so the current version has
stuck.  Maybe for 1.5 (2.0, 2000, whatever)

Brandon
-- 
 Brandon Long   (N9WUC)     "I think, therefore, I am confused." -- RAW
 Computer Engineering   	Run Linux 1.1.xxx	It's that Easy. 
 University of Illinois    blong@uiuc.edu   http://www.uiuc.edu/ph/www/blong
		Don't worry, these aren't even my views.

Mime
View raw message