Thin is a web server that glues together 3 of the best Ruby libraries in web history:
- the Mongrel parser: the root of Mongrel speed and security
- Event Machine: a network I/O library with extremely high scalability, performance and stability
- Rack: a minimal interface between web servers and Ruby frameworks
Which makes it, with all humble humility, the most secure, stable, fast and extensible Ruby web server ever built, bundled in an easy to use gem for your own pleasure.
Why another web server ?
Thin started as an experiment to build an 100% Ruby singled threaded server which ended up being as fast as Mongrel on some cases (like handling Rails request). But that was not enough. Using the EventMachine library the performance and stability are now more impressive then a 500 pounds guy standing on one hand and juggling with the other.
It’s less then 500 lines of clean and fully tested Ruby code plus the customized Mongrel parser (written in C).
Faster then Mongrel ? Yeah right !
Yes it is! It’s even faster then the patched version of Mongrel that uses EventMachine (aka Evented Mongrel).
sudo gem install thin
Then in your Rails application directory:
You can also use it with any framework that support Rack. More info on the usage page.
More alpha then the Greek letter
This is the first experimental release. If you use this on your production server right now you are stupid, looking for extreme sensations or trying to find a way to get fired.
If you’d like to help, have fun or report a bug, join me in the project Google Group and get the code:
git clone http://code.macournoyer.com/git/thin.git
Stay tuned for updates and releases!