[Buffalo-pm] mod_perl and mass virtual hosting

Joshua Johnson joshpauljohnson at gmail.com
Tue May 25 09:23:31 PDT 2010


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. 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/buffalo-pm/attachments/20100525/7bb328ca/attachment.html>


More information about the Buffalo-pm mailing list