Hi there,

On Sat, 20 May 2000, Chris Nokleberg wrote:

> I was rereading
> 
>   http://perl.apache.org/guide/scenario.html#Buffering_Feature
> 
> does it make the light frontend buffering proxy technique useless as
> long as your pages fit in the socket buffer size (256K on Solaris)?
> (assuming the proxy is just a dumb passthrough to one backend
> server)

You might think that it serves little purpose for a light Apache
server simply to pass all requests from a socket through to a heavy
mod_perl server, only then to receive the reply and pass it back to
the socket.

But you don't usually know what is the other side of the socket, and
so you don't know how fast the buffer will be emptied.  It might take
a couple of minutes if the client is on a slow line.

Your processes could all be waiting for the socket buffers to be
emptied by slow clients, so there may be no free child to serve an
incoming request.  In that case Apache will just keep spawning new
ones (if it's allowed) for any new incoming requests.  You could build
up a big heap of waiting processes.  You will have far less resources
consumed by the waiting processes if they are plain Apache children
than you will if they are Apache+mod_perl children.  So you will be
able to spawn more processes, and so serve more incoming requests.

It depends of course on the profiles of your users, the resources
requested, etc.etc...  You can make measurements, or calculations, or
guesses, or you can just wing it.  But you don't want to let Apache
spawn so many children that you get into swapping, nor do you want to
force your clients to wait unnecessarily.

73,
Ged.


Reply via email to