httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Burry" <>
Subject RE: Advanced Mass Hosting Module
Date Fri, 14 Mar 2003 00:55:19 GMT
These are neat ideas.  At a few companies I've worked for we already do
similar things but we have scripts that generate the httpd.conf files
and distribute them out to the web servers and gracefully restart.
Adding a new web server machine to the mix is as simple as adding the
host name to the distribution script.

What you're talking about doing sounds like a lot more complexity to
achieve a similar thing, and more complexity means there's a lot more
that can go wrong.  For instance, what are you going to do if the LDAP
server is down, are many not-yet-cached virtual hosts just going to
fail?  In our scenario it's solved simply and easily by the generation
script simply failing and nothing being copied (but at least the web
servers keep working fine with the last config revision, so not many/any
end user web surfers will notice the outage).


-----Original Message-----
From: Nathan Ollerenshaw [] 
Sent: Thursday, March 13, 2003 3:28 AM
Subject: Advanced Mass Hosting Module

Resending this to this list as I got no response on users list.

Currently, we are using flat config files generated by our website
provisioning software to support our mass hosted customers. The reason
for doing it this way, and not using the mod_vhost_alias module is
because we need to be able to turn on/off CGI, PHP, Java, shtml etc on a
per vhost basis. We need the power that having a distinct <VirtualHost>
directive for each site gives you.

Is there a better way?

What I have in mind is a module that fits in with our current LDAP based
infrastructure. Currently, LDAP services our mail users, and I would
like to see the Apache mass hosting configuration held in LDAP as well.
In this way, we can just scale by adding more apache servers, mounting
the shared docroot and pointing them to the LDAP server.

The LDAP entry would look something like this:

#, base
dn:, o=base
siteGidNumber: 10045
siteUidNumber: 10045
objectClass: top
objectClass: apacheVhost
docRoot: /data/web/04/09/
vhostStatus: enabled
phpStatus: enabled
shtmlStatus: enabled
cgiStatus: enabled
dataOutSoftLimit: 1000000 (in bytes per month)
dataOutHardLimit: 10000000
dataInSoftLimit: 1000000
dataInHardLimit: 10000000
dataThrottleRate: 1000000 (in bits/sec)

Then, as a request came in, the imaginary mod_advanced_masshosting
module would first check to see if it had the information about the
domain already cached in memory (to avoid hitting LDAP for every HTTP
request, which would be a Bad Idea) and then if not, it would grab the
entry from LDAP, cache it, and service the incoming requests.

The cache itself would need to be shared among the actual child apache
processes somehow.

In addition to these features, the module would keep track of the amount
of data transferred in & out for each vhost and apply a soft/hard limit
when the limits defined in the LDAP entry were reached. The amount of
actual data transferred would periodically be written to either a GDBM
file or even to an LDAP entry (not sure what is best - probably LDAP for
consistency) and the data would also need to be shared among any servers
in a cluster somehow.

This would enable ISPs to bill on a per vhost basis fairly accurately,
and limit abusive sites.

Now, I've looked around for something like this, and as far as I can
see, there isn't anything that does vhosting quite like this, except for
the commercial systems out there such as Zeus.

Do people think this is a good approach?

Will another method give me what I want? (LDAP is not a dependency, just
a nice-to-have)

Finally, I am thinking about starting an Open Source project to write
this module. My C is pretty primitive right now, though I have got
simple LDAP lookup code working already (just not in Apache, yet).

Would anyone else see this as a worthwhile project for Apache?

It certainly would solve our problems, but it sometimes feels like I'm
trying to fix a simple problem with something very heavy - though
implemented correctly, I don't think performance will be a problem.

Comments gratefully received :)



Nathan Ollerenshaw - Systems Engineer - Shared Hosting ValueCommerce
Japan -

If you think nobody cares if you're alive, try missing a
couple of car payments.

View raw message