Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Recommended Mod_Perl set up?

Quote Reply
Recommended Mod_Perl set up?
Hi,

I've been reading about the variety of mod_perl set ups that one can have when running links_sql, but am a bit confused as to how it all works.

As I understand it, to run mod_perl, it's best to:

1) Install another version of apache with mod_perl support compiled in
2) Use mod_rewrite to rewrite all requests for the cgi directory to http://servername:8080/ (the new apache server with mod_perl compiled in

(Pretty much as it states here: http://perl.apache.org/docs/1.0/guide/scenario.html#One_Plain_and_One_mod_perl_enabled_Apache_Servers)

This then avoids having a mod_perl enabled server getting tied up with normal, non-perl requests.

Is this the preferred way to set up mod_perl? If not, how should one go about it?

I've also heard about using ProxyPass and mod_proxy to forward requests to the backend server. Is this the better way?

Thanks for your time.
Quote Reply
Re: [cwi] Recommended Mod_Perl set up? In reply to
Yes, this is the preferred way of setting up mod_perl.

And yes, you should use ProxyPass to foward requests to the mod_perl enabled backend server.

BTW: GT offers hosting, with excellent setup of mod_perl.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Recommended Mod_Perl set up? In reply to
>>
BTW: GT offers hosting, with excellent setup of mod_perl.
<<

I second that :)
Quote Reply
Re: [cwi] Recommended Mod_Perl set up? In reply to
Hi,

Yes this is definitely the way you want to go.

You do this as then you don't need nearly as many mod_perl servers hanging around. Apache keeps a separate process for each active connection to your website. Each connection takes up a ceartain amount of system resources. If the connection is to a mod_perl enabled apache, it takes up a lot more resources then a regular apache.

So if you have 50 active connections, and 40 of them are for html pages and images, and 10 are for things you actually need mod_perl for (search.cgi, page.cgi, etc), then by splitting up Apache in a frontend/backend, you need far fewer mod_perl processes, meaning more resources available for your system.

Also, remember, the process needs to last until it has sent all the information to the client. If you are sending a 50k output of a cgi script to someone on a 28.8 dialup modem, it will take a couple seconds to send it. With the frontend/backend setup, the mod_perl server can send it instantly to the smaller regular apache, and then take on the next request. It's not sitting idle waiting on a slow modem connection. Again, this reduces the number of mod_perl processes needed.

Hope that helps,

Alex

ps: yes, we do have excellent mod_perl hosting, we have shared and dedicated servers that come with this setup preconfigured and managed through a web interface. ;)
--
Gossamer Threads Inc.