perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@elem.com>
Subject Re: cleanup handler - is it "free" time?
Date Wed, 20 Jul 2011 22:21:24 GMT
2011/7/20 Torsten Förtsch <torsten.foertsch@gmx.net>:
> If the connection is kept alive the client will think the request is done
> and send the next one over the same connection. But the server will start
> processing it only when the cleanup handler returns.

A common approach is to use KeepAlive on the front-end proxy but not
on the back-end mod_perl server.

The other problem though is with scaling.  If you do a lot of work in
cleanup handlers, you'll end up tying up a lot of processes that would
otherwise be handling requests and possibly run out of free processes.

Using an external queue avoids this.  It also lets you control how
many of the queued jobs you handle at one time, so you don't bog down
your database or credit card processor.

But... for simple things that happen occasionally, cleanup handlers
are VERY easy.

- Perrin

Mime
View raw message