Related to this topic, I have a question about multiple instances of Apache.
We run two mod_perl enabled sites on two separate IPs. These sites rely on
mod_perl heavily. Each site has a unique perl script that handles just about
everything. Currently, we only have one instance of Apache running, and I've
noticed that the httpd child processes are quite large (up to 32megs!).
We've upgraded the RAM on our server twice and now we're at 512, but it
seems to be using all of that without a problem. Are these httpd processes
so large because they include copies of both perl scripts? Would it be more
efficient to set up two instances of Apache, one for each site/IP, and that
way each child httpd would only contain one of the two perl scripts?

Thanks!

Jon
----- Original Message -----
From: "Dave Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 11:56 AM
Subject: Re: Do virtual hosts need their own servers?


> On Thu, Aug 16, 2001 at 06:47:23PM +0100, Ged Haywood wrote:
> > Hi there,
> >
> > On Wed, 15 Aug 2001, Philip Mak wrote:
> >
> > > When I have multiple virtual hosts running Apache::ASP (mod_perl), do
they
> > > need to run their own instance of Apache?
> >
> > If one Apache is listening to port 80 then no others can.  This is why
> > you will get an error message when you try to start an Apache when
> > there is already one listening on the port(s) that the newly starting
> > Apache tries to bind to.  If you want to run more than one Apache
> > server instance then they all have to listen on different ports.  So
> > you could for example do some URL-based redirecting with a proxy
> > listening on 80 and handing requests to other instances which are
> > listening on other ports, or something like that - a bit like having a
> > light/heavy server pair (see the Guide) but for different reasons.
> >
>
> Only one instance of apache can bind to the same port *on the same IP*.
>
> By having one server answer to multiple IP addresses (on one or many
> network interface cards) you can have as many apache instances as you have
> IP addresses (not forgetting 127.0.0.1 if you're so inclined).
>
>
> Depending on the O/S you may also consider (I have and have dismissed it
> as too troublesome) running apache on different ports and using
> transparent port mapping such that
>
> --> IP address 1 : 80 --> local port 8000
> --> IP address 2 : 80 --> local port 8001
> --> IP address 3 : 80 --> local port 8002
>
>
> Dave
>
> --
>
> - Dave Baker  :  [EMAIL PROTECTED]  :  [EMAIL PROTECTED]  :
 http://dsb3.com/ -
> GnuPG:  1024D/D7BCA55D / 09CD D148 57DE 711E 6708  B772 0DD4 51D5 D7BC
A55D
>
>
>

Reply via email to