views:

549

answers:

3

When I started my first bigger Rails application, I chose to use Apache (with Passenger), because I already had some experience with it with PHP, but I don't have any deep knowledge of deploying Rails applications.

How would one choose web server for a Rails app?

Are there any main differences between Apache and Mongrel?
Or is it just a matter of taste?

+1  A: 

As you know, two popular setups are:

  • Apache + passenger

  • Apache + mongrel (Apache sending requests to your mongrel cluster)

Yes, It is a matter of taste. You made the good choice with Passenger for your first app as it is far easier to setup. It is the #1 recommended option on ROR official Website. Performance is also very good.

Using mongrel is still a good option but it is harder to setup and administrate. You will need to make sure you are running your rails app against a cluster of mongrel and not only one mongrel instance (for performance/concurrent request reason). Meaning adminstration of your apache + administration of your mongrels.

Aurélien Bottazzini
+1  A: 

There is no reason to use mongrel.

The reason you see lots of sites/tutorials using mongrel is.. it was a good choice before Passenger.

Passenger is better on the performance side, dead easy to install and no (for the 90% cases) managing is required.

amikazmi
A: 

You can also do Nginx + Mongrel cluster. (I don't recommend it though.) Go with Phusion Passenger. It's pretty easy to setup and it's fast. No reason not to use it.

I use Passenger with Nginx. Besides just the web server, also look into using Ruby Enterprise Edition. It's going to save you a good amount of memory. ~30%. Ruby Enterprise Edition.

Jim