Redundant Memcache Servers and Rails
Posted by Nathan Kaiser on Wed Jan 07 13:07:00 UTC 2009
In the web 2.0 world, redundancy and scalability are buzzwords you hear every day. At Blue Box Group, we are constantly working with our clients to ensure that their sites are both fast, and available during a failure. During recent testing of a client’s website, it was discovered that in the default installation of Rails 2.2.x (and possibly other versions) are using memcached code that will lock up an installation of Rails if the memcached server dies. Additionally, if you are using multiple memcached installations for redundancy, rails will not gracefully fail over to use the second.
Not good.
However, our friends over at FiveRuns have devised a clever set of patches for the memcache client gem. You can read about their fix in their blog post here. You can install their patched version of memcache client with these commands:
$ sudo gem uninstall memcache-client $ sudo gem install fiveruns-memcache-client --source http://gems.github.com
Preliminary testing shows that this gem fixes all the associated problems with the existing memcache-client and HA setups.
We will continue to test this configuration in production, but don’t expect to see problems with it.
Thanks to FiveRuns for providing the fix. Hopefully this will be adopted into mainline soon.
- Jesse Proudman
Blue Box Group
THE LATEST
THE ARCHIVES
- July 2010
- June 2010
- May 2010
- March 2010
- February 2010
- January 2010
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- March 2008
- January 2008
- December 2007
- October 2007
- August 2007
- May 2007

