Seesaw: An Improved Restart System for Mongrel
By Peter Cooper / August 25, 2007
Most Rails developers will be familiar with *** ****'s Mongrel, a great HTTP library used by most Rails developers to either test or deploy their applications (it's also pretty great for building your own basic HTTP handlers too, but I digress).
Sometimes when restarting applications after code updates, some requests can be "lost" in the whole process, particularly in high-traffic environments. Seesaw, developed by Max Muermann and Matt Allen, however, resolves this problem by restarting your mongrel processes one by one so that availability is ensured. Seesaw is available as a gem (gem install seesaw), although this blog post is essential reading to learn about integration with Nginx and Apache.
Comments
-
Carl Mercier says:
August 26, 2007 at 2:23 amI can't believe it! I just implemented the -exact same thing- and I was about to release it to the world on Monday. Looks like somebody beat me to it :)?
-
Carl Mercier says:
August 26, 2007 at 2:43 amAfter reading a little more about Seesaw, I can say that their approach is more robust than mine, so my last comment was wrong, my solution is not the exact same thing although the results are similar.
-
Kirk Haines says:
August 27, 2007 at 3:23 amJust wantd to throw out there that Swiftiply, as of the 0.6.1 release, also addresses part of this by providing redeployable requests. If the backend goes down before returning a response, the request can be redeployed to a different backend.
-
Carl Mercier says:
September 7, 2007 at 3:15 pm@kirk: that sounds like a great idea! Does it detect if Mongrel is down or it will time out after x number of seconds?
-
Carl Mercier says:
September 7, 2007 at 5:59 pmHere's my hack for those who might be interested:
http://blog.carlmercier.com/2007/09/07/a-better-approach-to-restarting-a-mongrel-cluster/
Other Posts to Enjoy
-
Ruby’s Unary Operators and How to Redefine Their Functionality
Ruby’s Unary Operators and How to Redefine Their Functionality
-
The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists
The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists
-
The Mega Ruby News and Release Roundup for February 2012
The Mega Ruby News and Release Roundup for February 2012
-
A Lagom Review of O’Reilly’s ‘Sinatra Up and Running’
A Lagom Review of O’Reilly’s ‘Sinatra Up and Running’