Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Ruby web server? [closed]

Historically I have used Thin as an application server (for Ramaze apps, but it could easily be for Rails), which receives requests from an Nginx web server.

Does anyone have experiences between using Thin/Mongrel/anything else to server Ruby applications to a web server? I am keen to keep things lean and fast.

like image 948
kez Avatar asked Dec 13 '22 00:12

kez


1 Answers

I find Passenger to be incredibly easy to set up. It works in combination with Apache or Nginx, and it should be able to serve any Rack-based application or framework.

According to its authors and many other users out there, it's supposed to be very lean on memory when used in combination with Ruby Enterprise Edition, at least for hosting multiple Rails applications.

Personally, I find that the biggest advantages are:

  • It's really dead easy to set up, and works in a mod_php-esque way.
  • It drops privileges and runs my Rails app as a regular user.

The latter is pretty cool, and I didn't even notice it right away. I simply set up a user account specifically for the application, unpacked the application in the home directory, and then went through the Passenger setup steps. It was only after I looked through the process list that I noticed it had also dropped privileges to the user.

like image 186
Stéphan Kochen Avatar answered Dec 15 '22 14:12

Stéphan Kochen