For Rails applications I am using THIN on my local machine since a couple of weeks and found it better than Mongrel. I’ve started replacing mongrel with THIN on servers as well. THIN leverages the best of the available resources… It uses mongrel’s parser along with the Eventmachine and the Rack Ruby libraries which together provide better speed, greater requests/sec and certainly consumes lesser memory.

Install THIN by issuing

THIN accepts more or less similar switches as that of mongrel. You start THIN by issuing

-p — port, defaults to 3000
-e — environment, defaults to development
-d — daemonize mode

THIN provides an in built support for clustering and running multiple servers for the same applications. You can start say 3 servers for the single application by providing the -s switch as…

And similar to mongrel it will start three servers on the ports 9090, 9091 and 9092.

Share this: