Fastest Way to run Rails


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:

[2] Apache 2.2 mod_proxy_balancer and mongrel cluster:

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 Bengtson

24 jun 2007 kl. 18.14 skrev Keith Davey:

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

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.