[Catalyst] OT: mod_fastcgi vs. mod_perl (was uri_for() question)

John Siracusa siracusa at mindspring.com
Tue Mar 28 02:46:45 CEST 2006


On 3/27/06 5:26 PM, Perrin Harkins wrote:
> The benchmarks I've seen show no significant performance differences.  I
> wouldn't choose based on that.  Or do your own benchmark if you're dying
> to know.  It will probably reveal more about which one you know how to
> tune than anything else, but that's still important.

One of the things I like about mod_perl is that it provides access to
Apache's C implementations of many common HTML/HTTP-related functions: URI
and HTTP header parsing, string encoding and escaping, etc.  These are much
faster than the equivalent pure-perl implementations, and really increase
the speed of "small" requests that aren't dominated by big db queries or
whatever.

A good example is serving a request from some cache, where the majority of
the work in the common case (cache hit) is in parsing the headers, URI, and
cookies, then making a decision to return from the cache or not.  (Note that
I'm not talking about static files, which are of course better handled by a
light-weight proxy server in front of the app server, whether it be a
stripped-down apache or lighttpd or something else.)

-John





More information about the Catalyst mailing list