Hi, I’m a newbie to Ruby. I’m installing an small server (256MB RAM)
with NginX, Neko, Perl, PHP4, PHP5, Ruby & MySQL. It’s easy Perl,
Neko & PHP with FastCGI but why to use a mongrel cluster?
Because that’s the way it works this side of reality
no, really, you could run most Ruby apps using different setups
(i.e. with FastCGI as you say), but it’s actually much simpler to do
it via Mongrel.
It’s my first time with nginx & ruby, so why I should use mongrel?
Why not just FastCGI-ruby if available? Is mongrel cluster too much
load for 256MB RAM?
It varies tremendously with the kind of applications you develope. I
will assume that, as is the case with most new Ruby webapps, you are
developing Rails. In my server, each Mongrel instance takes typically
between 20 and 50 MB RAM, for smallish applications. Of course, you
will probably have to add the Web server you choose (i.e. nginex) and
the RDBMS. However, running Mongrel clusters makes it easy, if not
trivial, to split the load among several machines. Yes, this is not
the perfect way of scaling if your app load grows, but it is… good
enough
With PHP there is no security for shared servers. How does ruby
handle shared hosting security? Is there an appropriate way to
install ruby-mongrel this way?
You can have many different models. PHP’s main problem in this regard
is that it is most often run inside the Web server - so all instances
are run as the same user. You can do it differently, i.e. setting it
up via different FastCGI processes, but I’m talking about the general
case. With Mongrel, you can launch each instance as a different user -
The webserver just opens a socket to talk with Mongrel, but each
Mongrel can be owned by a different user, and get the user’s set of
permissions.