perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <f...@redhotpenguin.com>
Subject Re: mod_perl and mass virtual hosting
Date Thu, 27 May 2010 19:39:56 GMT
It sounds like you are using mod_perl and mod_proxy on the same main
httpd, is that right?

If so, consider running another front end proxy such as apache with
the event_mpm, perlbal, ha_proxy, or nginx.  Without having more
details (Devel::NYT::Prof may provide some), my guess is that you are
blocking on child httpds in mod_proxy.

On Thu, May 27, 2010 at 12:36 PM, Joshua Johnson
<joshpauljohnson@gmail.com> wrote:
> Hello all,
>
> I have a question on using mod_perl to configure apache for many virtual
> hosts. My problem is the high load on the apache server. I decided to go
> with mod_perl to configure apache and here are the reasons (if I should be
> doing this a different way, please say so. I'm open to suggestions).:
>
> The company I work at has ~13,000 customer domains. There is a database
> where these domains are configured. Some of them are "standard" packages and
> simply have a document root where customers upload pages. Some of the
> domains make proxy requests to another site. And still others make a proxied
> rewrite from "/" to "some random url that is stored in the db". Some
> redirect to another url. There are about 20 other such configurations.
>
> I used mod_perl to load all of this up at startup and it worked beautifully.
> I originally thought that I would be able to dynamically setup VirtuaHost
> sections as requests came in for domains (maybe they were freshly added to
> the db or the record updated). But I found you can't really do that so I
> have to restart for changes to take effect. Either way, I'm very happy with
> how easy and clean mod_perl has made all of this.
>
> But the load on apache runs anywhere from 0.50 to 3.00 on a dual cpu server.
> Response doesn't seem slow (except for right after an apache restart) but
> I'm worried that I'm doing something fundamentally wrong. There is a
> significant amount of proxying going on so I set "ProxyReceiveBufferSize
> 16384" but that doesn't seem to have changed too much. Could mod_perl be the
> cause of the load or would it be the end apache config? Are there any
> initial thoughts anyone has? Has anyone run into something similar? Should I
> be going about this a different way?
>
> Related: and would it be possible to add config on-the-fly? $r->add_config()
> Won't let you add VirtualHosts because it operates as though in a <Location>
> directive.
>
> I guess I'm just looking for thoughts in general. I've been tinkering with
> this for about 2 weeks now.
>
> Thanks,
> Josh J
>
>

Mime
View raw message