# Fastest Way to run Rails

**URL:** <https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640>\
**Category:** Rails\
**Created:** [June 24, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640 "2007-06-24T18:15:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [June 24, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640/1 "2007-06-24T18:15:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [June 24, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640/2 "2007-06-24T18:37:26Z")

</div>

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/](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-](http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-)  
apache-2-2-mod\_proxy\_balancer-and-mongrel

–  
Jordi

---

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [June 24, 2007, 7:33pm UTC](https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640/3 "2007-06-24T19:33:33Z")

</div>

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.:

---

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [June 24, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/fastest-way-to-run-rails/107640/4 "2007-06-24T20:08:37Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> >

–  
Michael S.  
Linux Admin/Developer  
AIM: mikesteinfeld  
GTALK: removed\_email\_address@domain.invalid
