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 Sat, 22 Apr 1995 22:21:13 GMT
Last time, Rob Hartill uttered the following other thing:
> 
> 
> 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.
> 
> My first thought was, "Aha, reduce the TIMEOUT for receiving
> a request to something more realistice - say 20 seconds"
> ...but that's going to cause problems for people POSTing large
> amounts of information over slow links.
> 
> The only real soultion I could come up with was to have a forking
> model as a fallback. 

This is exactly what 1.4 does.  If all of the children are in use, and 
there are MaxServers of them, then it will fall back to 1.3 type behavior.
 
> The children can send signals (ALARM or whatever) to the parent to 
> say "ready" or "busy". The parent only needs to know how many of
> the children are "ready", so that in the event of all of them being
> "busy", it can then spawn the forking model.

We just use an array to mark a child as "Busy" and when the child is done,
it sends a DONE message to the parent who then clears the busy flag.
 
> All this is based on the paranoia that someone will think it'll
> be a hoot to clog someone else's server. If I though of it, I'm
> sure someone else will too.

The main reason we added this was because of alpha tests on hoohoo and 
www.acm.uiuc.edu.  On hoohoo we have a really bad archie script that almost
never returns as it waits for the archie request to finish.  This will tie
up the child until TIMEOUT usually.  The problem with www.acm was Rob's 
Multimedia Lab, which contains muli-megabyte files.  During peak times,
30-40 connections would be likely, because of time to service was so high.

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