[Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application

Bill Moseley moseley at hank.org
Sat Jan 30 02:14:09 GMT 2010


Just so it's not one-sided, I moved from FastCGI to mod_perl some years
back. Start up and restart time was one issue, IIRC, but mod_perl was
trivial to configure and solved stability issues we were seeing.  I never
went back, so maybe it's better now.  Is there now a manager that will spawn
more FastCGI processes based on load?

The Catalyst server is used for development.  The app knows it's running
with that engine and disables the SSL requirements, but logs that the page
would be blocked if not in SSL.

Starting different configurations is no problem at all.  I have an app
startup script that generates the httpd.conf file from configuration files
at startup time.  It's basically start_app --app=3Dfoo --mode=3Dtesting.   =
The
apps have dev, testing, qa, stating, and production modes, so as you can see
it's not a big deal.  All those are on different machines, but different
modes can use different ports, of course, so can be on the same machine.

I'm usingCronolog so there's no log rotation/restart needs.

mod_perl does seem a bit heavy weight just to serve requests, especially
since all we use is the response handler.  We also don't use many modules
(SSL is not handled by Apache).  I've meant to look at other server options,
but there's not pressing need.

I don't really see how what server you use effects error messages.  Stderr
is stderr.   I would never use the canned Apache error responses anyway for
a site.

True, Apache can run as only one user.  But, that's normally the apache (or
whatever) user which has very limited access, which is what you want.  So, I
don't see a benefit of running as different users.  Apps may need to run on
multiple machines so only part of the file system need access to would be
for temp files.

I think mod_perl is daunting to some due to all the possibilities (and
default httpd.conf Apache provides) but really the config required to get it
to serve a Catalyst app is just a few lines.  My entire files are pretty
small:

$ fgrep -v '#' httpd.conf | grep -v '^$' |grep -v LoadModule | grep -v
'Module>' | wc -l
40




-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100129/971fb=
d13/attachment.htm


More information about the Catalyst mailing list