Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I user Apache or Nginx & Passenger or Mongrel for my Rails application

I have a Ruby on Rails application that will be a CMS in way which means it's mostly DB intensive. I expect it to have decent amount of traffic so before designing I'm choosing what servers to use. Most important for me is performance.

I heard good things about Nginx and many developers in the Rails community recommends it my only concern about it was that its version is 0.8 which is Beta I believe so I was concerned about potential problems. What is your say?

Also, I want to decide between using Mongrel cluster or Phusion Passenger. What do you think?

I'm planning to user Ruby 1.9 as it has better performance that Ruby 1.8 and I will be using VPS to host my website.

My main things is performance even if it takes longer to setup one over the other.

Your opinion is highly appreciated.

Thanks,

Tam

like image 439
Tam Avatar asked Sep 14 '09 07:09

Tam


People also ask

Do I need Apache if I have NGINX?

Together, they are responsible for serving over 50% of traffic on the internet. Both solutions are capable of handling diverse workloads and working with other software to provide a complete web stack. While Apache and Nginx share many qualities, they should not be thought of as entirely interchangeable.

Which is easier to configure Apache or NGINX?

Unlike Apache, however, NGINX has a somewhat simpler configuration system. Some of the functionality that would have to be added to an Apache installation using modules is included in NGINX by default, which means that there is less setup for admins to perform.

Do people still use Apache?

After Tim Berners-Lee's CERN httpd and NCSA HTTPd in the first couple of years of the internet, Apache – first released in 1995 – quickly conquered the market and became the world's most popular web server. Nowadays, it still is in that market position but mostly for legacy reasons.


2 Answers

I'd second for Passenger + Nginx. Very low memory and it's not too difficult to setup. What type of server are your deploying too? Specs? OS? I'd take that into consideration as well considering your available hardware. If you've got enough memory already, then it shouldn't be an issue whether its Passenger or Apache, just optimize and cache your app efficiently.

like image 184
Nick L Avatar answered Oct 06 '22 01:10

Nick L


Two comments: You can deploy any rails app to any of your mentioned servers, so no need to decide this once and for all now.

IMO mongrel clusters are no longer worth the trouble. Go for passenger on whatever server makes you happy.

like image 42
nasmorn Avatar answered Oct 05 '22 23:10

nasmorn