Index: [Article Count Order] [Thread]

Date:  Fri, 12 Nov 2004 13:42:47 +0000
From:  Dick Davies <rasputnik@...>
Subject:  Re: include problem
Sender:  Rasputin <rasputin@...>
To:  modruby@... (modruby ML)
Message-Id:  <20041112134247.GB15482@...>
In-Reply-To:  <20041112095158.GA81641@...>
References:  <41584A73.40408@...> <416C0247.4070001@...> <4187BCCA.60307@...> <4193A069.6060804@...> <opshcevzmogft90w@...> <20041112095158.GA81641@...>
X-Mail-Count: 01347

* Brian Candler <B.Candler@...> [1152 09:52]:
> 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.

If you're going down that path, I can recommend the articles on the Wiki at:

http://www.rubygarden.org/ruby?UsingRubyFastCGI

-- 
The heroes claimed that they did care about people getting shot,
so they crashed their cars into them instead. - DNA, on 'Starsky and Hutch'
Rasputin :: Jack of All Trades - Master of Nuns