httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David Robinson)
Subject Re: Apache 0.7: too many processes
Date Mon, 26 Jun 1995 17:22:00 GMT
Clearly you would need child -> parent communication, but not necessarily
the reverse. Why is that a bad thing?

The server needs a fast response to increasing load, with a slower falloff
when the load drops. The latter can be done as a first-order Poisson process
with the children killing themselves after a random (but constant mean)

The parent needs to know how often no child is 'accepting' on the socket
in order to determine when more children are needed. Maybe it could try
selecting on the socket itself, to determine if the queue of incoming
connections stays non-empty. Or alternatively, the children could send
it messages each time the call and return from accept().
The latter could also be used as keep-alives for the parent to notice
dead children, and allow it to bury them. You should be doing this sort
of communication anyway, for the hostname cache.

Of course, on those machines where you are forced to put a (shared-memory)
lock around accept(), you get low-overhead child <-> parent IPC for free.


View raw message