On Monday 01 February 2010 13:23:19 Rolf Schaufelberger wrote:
> Am 01.02.2010 um 12:32 schrieb Torsten Förtsch:
> > On Monday 01 February 2010 11:48:19 Carl Johnstone wrote:
> >> So rather than +Parent which just gives a VirtualHost a separate
> >> instance -  what would be nice would be some way of specifying which
> >> perl instance to use in this VirtualHost. Something like:
> >> 
> >> <VirtualHost *>
> >> ServerName www.example1.com
> >> PerlInstance myappv4
> >> </VirtualHost>
> >> 
> >> <VirtualHost *>
> >> ServerName www.example2.com
> >> PerlInstance myappv4
> >> </VirtualHost>
> 
> same problem and same wishlist  for me.  Ii would  also be glad to be able
>  to create pools and assign them in the virtualHot directive
> 
> >> 
> >
> > Feasible by patching modperl's interpreter pool handling.
> > 
> > But how about using several apache instances and a mod_proxy-based proxy
> > in  front to pass the requests to the appropriate instance? This can be
> > implemented without patching modperl.
> > 
> > Torsten
> 
> Well,   would  PerlSwitches  -I/path/to/myappv4  within each VirtualHost do
>  that job ? 
> 
I think Carl is concerned here about memory usage. With the current 
implementation each vhost gets its own interpreter. But he does not need that 
many interpreters. He needs far less than the number of vhosts he has defined.

So, I could imagine something like this:

<PerlNameInterpreter myappv4>
  PerlSwitches ...
  PerlModule ...
  <Perl ...>
  </Perl>
</PerlNameInterpreter>

<PerlNameInterpreter myappv5>
  PerlSwitches ...
  PerlModule ...
  <Perl ...>
  </Perl>
</PerlNameInterpreter>

<VirtualHost ...>
  PerlUseInterpreter myapp4
  ...
</VirtualHost>

That would create 2 named interpreters myappv4 and myappv5. Then one can 
decide which one to use in which vhost. To confuse the user a bit more it can 
even be made switchable in a <Location>. That mean up to one gets MapToStorage 
one interpreter and from HeaderParser to the end another.

Torsten

Reply via email to