You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Frank Wiles <fr...@wiles.org> on 2007/03/15 22:57:52 UTC

Re: mod_perl implementation possibility

On Thu, 15 Mar 2007 12:54:37 -0700 (PDT)
"James. L" <pe...@yahoo.com> wrote:

> mod_perl 2 seems solve the problem with virtual host
> which will require us to adopt apache 2 and use
> virtual host.
> 
> my understanding may be false but i would like to hear
> your point of view and help me figure out the problem
> we may have if we decide to use more Perl in our
> development.

   I would definitely go with mod_perl 2.x for the reasons stated
   previously. 

   Also, just wanted to point out that you can separate apps via
   VirtualHosts in mp1 as well as mp2.  There isn't anything
   new about that ability in mp2. 

   I've got servers with probably 20+ different small/mid/large
   sized apps in the same Apache without issue, both in mp1 and
   mp2 scenarios. Largest app in that bunch is around 50k lines of
   Perl. 

   With good coding practices it really shouldn't be an issue. 

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------


Re: mod_perl implementation possibility

Posted by Perrin Harkins <ph...@gmail.com>.
On 3/16/07, James. L <pe...@yahoo.com> wrote:
> any special setup for mod_perl 1 + apache 1 under
> virtual host? it works but my impression is that it is
> hard to setup and must be coded very carefully.

It's not hard to setup, and it doesn't require any special coding
practices beyond any other long-running perl program.  Since there is
only one interpreter running in each child process, you can't do crazy
things like load two different versions of the same module.  If you
wanted to do that (say you want to have your staging code and your
production code), the easiest approach is to run multiple apaches.
There's a lot of documentation and suggestions about this in the docs
on perl.apache.org and in the mod_perl books.

> that's probably the reason why i rarely see mod_perl
> offered in share dhosting environment.

If you're looking for cheap hosting, try looking for one that offers
you your own virtual machine with full access.  Those are pretty
inexpensive.

- Perrin

Re: mod_perl implementation possibility

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Mar 16, 2007, at 11:55 AM, James. L wrote:

> any special setup for mod_perl 1 + apache 1 under
> virtual host? it works but my impression is that it is
> hard to setup and must be coded very carefully.
>
> that's probably the reason why i rarely see mod_perl
> offered in share dhosting environment.

no, mod_perl is just unsuitable for shared hosting by design.  it has  
nothing to do with virtual hosts.

	a- mp caches code into apache.   it can take *a lot* of ram.   
there's no effective way to manage memory in these situations -- you  
either preload everyone's stuff into apache at start, or apache takes  
a performance hit each time a child reads code for the first time.   
because apache children expire after x requests, in a shared  
environment you'll get almost no speedup - and a potential  
performance decrease.
	b- as clinton noted previously, the way mod_perl handles namespaces  
can cause overlap issues

As I said before, you're best off to just install apache2 and mp2 *in  
addition to apache1*. you can keep all your apache1 stuff running as- 
is on port 80.  just run/configure apache2/mp2 to run on an alternate  
port - like 8080 , and proxy the necessary requests to it via  
mod_proxy on 80.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



Re: mod_perl implementation possibility

Posted by "James. L" <pe...@yahoo.com>.
--- Frank Wiles <fr...@wiles.org> wrote:

> On Thu, 15 Mar 2007 12:54:37 -0700 (PDT)
> "James. L" <pe...@yahoo.com> wrote:
> 
> > mod_perl 2 seems solve the problem with virtual
> host
> > which will require us to adopt apache 2 and use
> > virtual host.
> > 
> > my understanding may be false but i would like to
> hear
> > your point of view and help me figure out the
> problem
> > we may have if we decide to use more Perl in our
> > development.
> 
>    I would definitely go with mod_perl 2.x for the
> reasons stated
>    previously. 
> 
>    Also, just wanted to point out that you can
> separate apps via
>    VirtualHosts in mp1 as well as mp2.  There isn't
> anything
>    new about that ability in mp2. 
> 
>    I've got servers with probably 20+ different
> small/mid/large
>    sized apps in the same Apache without issue, both
> in mp1 and
>    mp2 scenarios. Largest app in that bunch is
> around 50k lines of
>    Perl. 
>
>    With good coding practices it really shouldn't be
> an issue. 

any special setup for mod_perl 1 + apache 1 under
virtual host? it works but my impression is that it is
hard to setup and must be coded very carefully. 

that's probably the reason why i rarely see mod_perl
offered in share dhosting environment. 


>  ---------------------------------
>    Frank Wiles <fr...@wiles.org>
>    http://www.wiles.org
>  ---------------------------------

James.


 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html