Fastest Way to run Rails

Hi,

I am a bit confused about what is the fastest way to run a rails
application.

I have seen examples which use Apache, mongrel, lighthttpd, fastcgi etc.

Is there a correct way to do it? Or is it just a personal choice?

Thanks,

Keith

On Jun 24, 2007, at 12:14 PM, Keith D. wrote:

I am a bit confused about what is the fastest way to run a rails
application.

I have seen examples which use Apache, mongrel, lighthttpd, fastcgi
etc.

Is there a correct way to do it? Or is it just a personal choice?

I don’t really call it correct, but even though YMMV, I’ve had more
luck using mongrel (mongrel_cluster, really), and an HTTP proxy to
load balance between the mongrels.

Apache with mod_proxy_balancer gets used a lot for that, and after a
presentation on last Railsconf more people have started testing this
thing called nginx instead.

[1] nginx load balancing mongrel cluster:
http://leancode.com/2007/05/20/scaling-rails-nginx-plus-mongrel-cluster/

[2] Apache 2.2 mod_proxy_balancer and mongrel cluster:
http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-
apache-2-2-mod_proxy_balancer-and-mongrel


Jordi

You may want to take a look at Litespeed, too. I am mystified as to
why Litespeed doesn’t get more attention: the deployment process is
by far the easiest of all production setups, it does load balancing
and dynamic creation of server processes, it servers static content
extremely fast, and it reads Apache config files.

/ Peter B.

24 jun 2007 kl. 18.14 skrev Keith D.:

I am using Apache/Mongrel_cluster but they are behind a Cisco 11501
CSS/LB. If cost is not a factor for you so much, then IMHO this is the
way to go. I’ve been a *nix admin for about 9 years and have managed
many web clusters but only one rails cluster thus far and using the
Cisco CSS/LB really makes it simple. But it is an expensive piece of
hardware.

I’d say that the only thing I don’t like so much about mongrel is the
error logging. Which is not entirely Mongrels fault being that Ruby
errors can be obscure at times as well. Maybe I am doing something
wrong with my config, but my mongrel logs aren’t timestamped which
makes it really difficult to trace down problems for me at times
unless I happen to catch an issue as it occures.

So if anyone knows how to get more verbose logging out of mongrel in a
production environment let me know. I guess I can script the time
stamping, but haven’t got that far yet.

On 6/24/07, Peter B. [email protected] wrote:


Michael S.
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: [email protected]