mod_pweb 0.2 review

Download
by rbytes.net on

mod_pweb is a mass virtual hosting with shared memory segment for domain to path translations. If you want to run some hundreds of

License: GPL (GNU General Public License)
File size: 6K
Developer: Marc Oliver Becker
0 stars award from rbytes.net

mod_pweb is a mass virtual hosting with shared memory segment for domain to path translations.

If you want to run some hundreds of virtual hosts on an apache webserver and you configure the server in the conventional way, with virtual hosts in the httpd.conf, you will qick notice, that your httpd processes gets quite big (>90M).

Now, every new connection causes this big httpd process to fork. The data segment of the process only includes configuration information that does not change, so the process does not really need this space in memory. But Solaris, other than Linux, reserves this 90M in your swapspace.

If you have a heavy loaded server with 400 processes or more, you will need a minimum of 400 times 90M swapace. The swap organisation will keep the Kernel working, but not your webserver.

The Solution

The solution for this scenario could be mod_dynvhost or mod_pweb. Mod_dynvhost provides you a directory where you simply create a folder with the name of the domain. This is easy to use, but you won't be able to do a translation from let's say www.custumerdomain.com to /webdata/customerid.

This functionality is only provided by mod_pweb. The idea behind mod_pweb is, to have the complete virtual host configuration in one shared memory segment and then have small httpd processes attaching to this segment to do the domainname to path resolution.

The Build

Download mod_pweb-0.2b.tgz and unpack it with tar -zxvf mod_pweb-0.2b.tgz. Change in the mod_pweb-0.2b directory and execute make. This will build the initshm tool.

Now locate the apxs script which is included in your webserver binary directory. Then execute /PATH_TO_YOUR_APXS/apxs -c mod_pweb.c. After this build, copy the file mod_pweb.so to your apache libexec directory.

mod_pweb 0.2 keywords