Starling and a reliable Memcached client

We moved part of our FiveRuns Manage infrastructure to use Starling this week. I’m rapidly becoming a convert as it has proven to be simple, fast and reliable. The Starling 0.9.3 release is somewhat long in the tooth but GitHub has several Starling forks which contain performance improvements and bugfixes, including our own fiveruns/starling fork. Our fork has proven to be about 3 times faster than 0.9.3 in raw message processing speed.

More elusive has been the client library to use with Starling. Because Starling just uses the memcached protocol, any memcached client should be able to use Starling. The problem is that the most popular memcached client, Seattle.rb’s memcache-client library, has several bugs in the latest 1.5.0 version:

  1. set() fails when the socket has been disconnected (via Twitter)
  2. it does not retry if a socket operation fails (via Will Bryant)
  3. it does not retry the current operation on another server if a server dies

The first two I fixed by applying the patches at the links above. The last one I found and fixed myself – it’s critical for fault tolerance. We run two Starling servers for redundancy and if one goes down, we wanted the clients to transparently fail over to the other. All three bugs have been fixed in our fiveruns/memcache-client project. If you use our client, please let me know. I’d love to hear success stories!

8 thoughts on “Starling and a reliable Memcached client”

  1. Hey! Be fair! You just took out the fsync() call. :-p

    Very awesome to see you guys hacking on this, and I promise by the end of the week these changes will be rolled into Starling the Rubyforge-gem.

  2. Blaine, I didn’t mean to take credit for the Starling speedup. Our Starling project is a fork based on the work of several other people. We haven’t changed a line of Ruby code. Chris W’s evented changes were also important for us to get.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>