[Ruby] Good alternatives to Mongrel?
Scott Windsor
swindsor at gmail.com
Sat Jan 5 16:18:22 PST 2008
On Jan 5, 2008, at 11:16 AM, Bryan Liles wrote:
>
>
> On Jan 5, 2008, at 1:44 PM, Scott Windsor <swindsor at gmail.com> wrote:
>
>> It depends on what you're using mongrel for.
>>
>> I personally am not a big fan of using mongrel clusters for
>> production rails deployments - you can't spin up or down new
>> instances on the fly based on your current load. I'd look into
>> running rails as a fast cgi app, and then picking a webserver that
>> you can configure with fastcgi (apache, lighttpd, nginx, etc).
>>
>> If you're using merb or using mongrel as a simple stand-alone
>> webserver, you might want to look around elsewhere. I also don't
>> think using mongrel as a front-end webserver scales very well. It's
>> not multi-threaded, so the only way to scale out is to run lots of
>> mongrel (i.e. pack of mongrels or mongrel cluster), then front it
>> with either another webserver or a load balancer.
>>
>
> How much success have you had with this? Fastcgi isnt very nice and it
> is one of the reasons mongrel exists today.
>
I've had a great deal of success with apache and fastcgi pre-dating
my experience with ruby or rails, and have continued to use it with
rails. Apache scales quite well, and fastcgi is a nice way to handle
running web applications through apache. The configuration can suck,
but it's also extremely powerful and flexible. The main issue that
can bite many fastcgi applications is memory usage over time. Since
your application is getting restarted between each request (which is
a very good thing), you have to ensure you are free of memory leaks
and/or run your garbage collector at an appropriate interval.
I haven't worked with the various other webservers (ngix, lighttpd,
etc), but if they support fastcgi, then they should work just as well
as apache.
Here's some really good performance tests that where done some time
back comparing various rails deployments (including mongrel).
http://blog.kovyrin.net/2006/08/28/ruby-performance-results/
- scott
More information about the Ruby
mailing list