[Ruby] Good alternatives to Mongrel?
Scott Windsor
swindsor at gmail.com
Sat Jan 5 16:36:27 PST 2008
On Jan 5, 2008, at 11:23 AM, Phil Hagelberg wrote:
> Scott Windsor <swindsor at gmail.com> writes:
>
>> 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.
>
> Evented Mongrel does this IIRC. Check out Ezra's talk from RailsConf.
Thanks for the tip! I hadn't heard about evented mongrel, I'll check
it out.
>
>> 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).
>
> Last I checked FastCGI caused a lot of random crashes that were
> extremely difficult to debug, and forward development on it had
> basically ceased. Unless things have changed drastically in the past
> year, I would strongly warn anyone against using it. (Ever tried to
> deploy on Dreamhost? They only allow FastCGI, and it's a total
> nightmare.)
>
Make sure you're using mod_fastcgi, not fastcgid. fastcgid is more
unstable than a monkey on crack, but a lot of people use it because
it can be slightly easier to configure. Avoid this trap!
>> 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.
>
> Rails is not multi-threaded; Mongrel and Merb are. But yeah; you'll
> want
> to pop a load balancer like Nginx in front of it if you're using it
> for
> Rails.
>
> -Phil
Yup, and I think Rails not being multi-threaded is a very good thing.
Mongrel uses multiple threads for listening and queuing requests, but
only one thread will handle a Rails request at a time, and if you
really want concurrent requests, you have to move to running a 'pack
of mongrels'. Evented mongrel may handle this case, so I will have
to check it out.
The one thing I do really like about mongrel is that it's fully
written in ruby. I'd love to use ruby for my entire web stack,
including process management and load balancing (and of course it has
it be fast).
I refuse to debate over Zed's rant. He's obviously a jerk or has a
poor sense of humor. Either way, software speaks for itself, and
I'll use it based on the software's merit, not the author's.
- scott
More information about the Ruby
mailing list