Thin Rolling Restart Patch
August 2nd, 2009 Posted in My Project, Programming, Ruby, Ruby on RailsI wrote a patch for Thin web server to do a rolling restart (i.e. restart the server one at a time) when I was working for my final thesis, Localmapia. I put my source on Github, and already inform the developer of Thin. However, seems like he forgot about it.
Anyway, I just updated my code to reflect the edge version of Thin. You can checkout my code from:
http://github.com/sikachu/thin
Also, if you want to install my version of Thin, just do this command to install from source:
git clone git://github.com/sikachu/thin.git cd thin rake install
So, to use this feature, you just add onebyone: true into your thin cluster file, or use the flag -O or --onebyone when you’re issue restart command.
I still wishing this would be merged into the main branch.
(If you don’t know about Thin, it’s a web server purely written in Ruby. It uses very small memory, very lightweight, yet very powerful. Usually people will use it with Nginx acting as reverse proxy. I wrote this patch because during normal restart Nginx would display 501 gateway error, which this patch solves the problem by having at least 1 old-version running at the time of restart.)



Sorry, comments for this entry are closed at this time.