Index: [Article Count Order] [Thread]

Date:  Fri, 12 Nov 2004 09:51:58 +0000
From:  Brian Candler <B.Candler@...>
Subject:  Re: include problem
To:  modruby@... (modruby ML)
Message-Id:  <20041112095158.GA81641@...>
In-Reply-To:  <opshcevzmogft90w@...>
References:  <41584A73.40408@...> <416C0247.4070001@...> <4187BCCA.60307@...> <4193A069.6060804@...> <opshcevzmogft90w@...>
X-Mail-Count: 01346

On Fri, Nov 12, 2004 at 09:22:37AM +0100, Dominik Werder wrote:
> wouldn't it be possible for modruby to spawn multiple ruby instances and  
> let the user onfigure which virtual hosts should share the interpreter, if  
> any at all?

No, because if I understand rightly, mod_ruby doesn't spawn anything at all.

Apache spawns httpd worker processes. If you are running Apache with a pool
of 5 worker processes, each process *contains* an instance of mod_ruby, in
that it is linked directly in; it's part of the worker.

If you want this level of isolation, you should use fastcgi instead. Each
application then runs in its own process or pool of processes, and the httpd
worker which is dealing with a particular request sends it down a socket to
one of the application fastcgi processes.

This works well with ruby; you need to build libfcgi first, then install
mod_fastcgi for Apache and Moonwolf's 'fcgi' module from RAA.

Regards,

Brian.