Dylan,

Let's see: you have a client base who likes a staging-production development scenario. There's a few ways you can play it out:

1. Different client, different code base
You use 2 machines: 1 for staging and the other for production. Set them up exactly the same. Run your VirtualHost for each client. Since it's a unique code base for each client, there is no fear of code contanimation. Life is quite simple here.

2. Different client, same code base
You're probably setting up a product for PoC (hence the same code base), with a slightly different config for each client.

a. Turning on +Parent should do the trick (with ithreads), but you need to test it out a bit to make sure you got it right.

b. Since it's staging anyway, there's no need to spawn all the child threads/ processes. In which case you can create multiple instances of Apache for each client (perhaps even 1 for staging and another for production) with a minimal thread/ process count to save memory/ cpu. This method allows you to use either ithreads (which is only encouraged for Win32 platform) or prefork (Linux).

Having said that, production servers should ideally be free of unstable code. So putting staging stuff in the same box is not advised, unless your clients are very forgiving. :)


Dylan Tynan wrote:

I’m looking at the information in mod_perl 2 User’s Guide (and online) about using VirtualHost and +Parent, with an ithreads-enabled Perl, in order to be able to modify @inc by virtualserver. On my system I basically have that setup, and have tried it, and it seems to work fine (I tried it with prefork, though that appears not to matter except for the inefficiency of course).

I’m wondering what would happen if I –didn’t—have an ithreads-enabled Perl, but still set up the httpd.conf with the virtual-host/+parent stanzas? Will it fail on startup with an error about +parent being unsupported or some other error? Or does it run fine but I end up with a shared @inc across all virtual servers perhaps? ………….. I have a somewhat limited customer set and each customer will probably run a test & production setup, with mostly the same code in each environment (thus @inc conflicts). I’m wondering what, if anything, they might see….

I take it the only real way around the above situation is either to use an ithreads-enabled Perl or to run separate apaches… is there some other way?

Thanks!

Dylan


Reply via email to