ketama - a consistent hashing algo for memcache clients

Russ Garrett russ at last.fm
Wed Apr 11 11:20:51 UTC 2007


Dustin Sallings wrote:
>     The problem in the consistent-hashing case is that an added node 
> effectively shadows a node that was previously responsible for a given 
> key.  The new node will be queried for that key, but the previous node 
> will still contain it.  Removing the new node makes the previous node 
> be responsible for the key.
 From a practical point of view, we currently ignore this case and 
haven't had any problems. In reality, our memcache serverlist only 
significantly changes every few weeks (and this very rarely involves 
removing a node), so it would probably be sufficient to just set a 
default expiry time of a month or so. That's possibly good practice anyway.

One thing we would like to do is flush_all any servers before we add 
them back, but we haven't got round to that yet.

Russ


More information about the memcached mailing list