In said:
This is more of a hosting question, I know.
We use Perl primarily to write our website. The site uses CGI.pm
extensively. So, every page begins my $x=param('x') etc and depending
on whether it is 'undef' will jump to some routine or other. Lots of forms.
Now, would we better off hosting on 'mod_perl' server, and what are the
key advantages?
mod_perl is really good if you need access to the internals of apache, you
can do amazing stuff with filters and configurations and so-forth.
It does however, add bloat to apache. It's also pretty easy to screw
up, a bit harder to develop for (for example, unless you tweak the settings,
you'll have to restart apache each time you change a file, since they are
loaded in memory.)
mod_perl is fast.
I stumbled across this (again) awhile ago:
http://www.fastcgi.com/
Basically, it'll turn your script(s) into daemons. Apache forwards
the connection to a daemon, the daemon handles the request.
Works with perl, it's fast and it'll let you do stuff like cache database
handles. Also enables you to do a fair amount of your work in plain CGI
and then "move over" to FastCGI as the time comes. I was blown away by
how fast it was (and how it simplified development model) You still
have the "restart problem" but you can do 99% of your work in CGI mode
and then flip over to FastCGI when the time comes.
At first, one would think that moving the process out of apache would slow
things down. Doesn't appear to be the case and it'll let you trim apache down
some-what, for serving static content.
I'd recommend checking into it.
For stuff that doesn't get used very often (control panel admin page, etc..)
plain CGI makes a lot of sense. Remember with mod_perl or FastCGI or servlets
or any of that stuff, the web application stays in memory, even when no one is
using it. By moving seldom used programs over to boring, flat CGI mode you can
free up more resources for the web applications that /DO/ get used a lot. (and
put those applications on FastCGI / mod_perl)
You'll get better overall response times this way.
Jamie