ketama - a consistent hashing algo for memcache clients

Steven Grimm sgrimm at facebook.com
Tue Apr 10 17:00:29 UTC 2007


That was actually the next major thing on our memcached to-do list. 
Thanks -- you may have saved us a bit of work there!

-Steve


Richard Jones wrote:
> Every time we added memcached servers to the pool, the rehashing of all keys 
> would kill our database while the cache filled up again. We implemented a 
> consistent hashing algorithm that our memcached clients are now using to map 
> keys to servers. Now we can add new memcached servers without causing 
> chaos :)
>
> Here is the blurb and the code:
> http://www.last.fm/user/RJ/journal/2007/04/10/392555/
>
> Source download includes:
>  libketama, a c library
>  php_ketama, a php extension that uses the library
>  a pure java implementation
>
> I'm interested in other approaches (or even if this is a concern for most 
> people?). I read about the lots-of-virtual-buckets concept, but didn't find 
> an implementation. Anyone already using consistent hashing for memcache?
>
> RJ
>
>   



More information about the memcached mailing list