Hacker News new | ask | show | jobs
by pwk 6298 days ago
Depends on the app platform. In the rails world Phusion Passenger (aka mod_rails or mod_rack) in combination with Apache is making inroads for serving up dynamic content. Despite the bigger footprint and other downsides of Apache, I'm hearing more and more that stability and ease of configuration of Passenger are a win. I'm only running it on a low usage backend app for the moment, but it was definitely easy to set up.
3 comments

Passenger is a big win. I once ran nginx + mongrel_cluster, and while it probably had less overhead than the equivalent Apache + Passenger setup, it was more than cancelled out by the effort necessary to babysit the mongrel processes. This was also more of an issue with MRI-era Ruby and its associated memory leaks.

With Passenger, I set it and forget it. Time is money.

I agree.

I've been using NGinx/Mongrel for most of my large deployed apps, but am working to get things moved to Passenger (and Apache, natch), simply for the ability to do a graceful restart on most code changes. For large apps, the ever expanding mongrel footprint and slow restarts is becoming too much to bear.

So for me, Nginx has a lot to offer over Apache, but with the rails deployments I've been working on mostly, it's no longer enough.

Am I misunderstanding something, or is Phusion essentially just a slightly better FastCGI?

It does some magic sharing of read-only segments of memory by taking advantage of copy-on-write and a special version of Ruby, but other than that it seems like it does the exact same thing as FastCGI.

...is Phusion essentially just a slightly better FastCGI?

Well, it depends on whether you're looking at it from an academic or practical standpoint. AFAIK the technologies are not entirely dissimilar, as you suggest, but there are notable differences once you actually put them into use. I've used both for running rails apps, and a few things stand out for me:

1. Passenger is much easier to set up: it took me about 5 minutes to get my first Passenger based rails app up and running. The last time I set up a rails app w/FastCGI (admittedly a few years ago now) it took me much longer. This comes down to simpler configuration combined with better documentation. Subsequent application deployment is also easier (no manual server restarts required). This is worth a lot in practical terms, even if not flashy.

2. Passenger seems more stable. I never had quite the problems with FastCGI that others appear to have had, and I've only been using Passenger for a few weeks now, but there's a reason people used FastCGI less often once Mongrel became available.

3. Oh, and there's some neat stuff too: automatic spawning and pruning of application instances in response to demand, etc.

Yeah, the integrated monitoring in passenger really simplifies rails deployment a lot. It was always very tricky to shepherd the mongrels.
Phusion is also available for Nginx.