<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed Systems on Code Log</title><link>https://codelog.me/en/categories/distributed-systems/</link><description>Recent content in Distributed Systems on Code Log</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 12 Oct 2015 23:38:54 +0800</lastBuildDate><atom:link href="https://codelog.me/en/categories/distributed-systems/index.xml" rel="self" type="application/rss+xml"/><item><title>The Ketama Algorithm for Consistent Hashing</title><link>https://codelog.me/en/posts/consistent-hash-ketama/</link><pubDate>Mon, 12 Oct 2015 23:38:54 +0800</pubDate><guid>https://codelog.me/en/posts/consistent-hash-ketama/</guid><description>&lt;p&gt;There are already plenty of articles discussing the principle and applications of consistent hashing. If you have no idea what consistent hashing is at all, you can first read this article: &lt;a href="http://blog.codinglabs.org/articles/consistent-hashing.html" title="Consistent Hashing"&gt;Consistent Hashing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Relatively speaking, the principle of consistent hashing is fairly easy to understand. But in daily development I&amp;rsquo;ve found that while most colleagues have a rough understanding of the principle, very few know the concrete implementation. Of course, different languages have different implementations; one of the more famous ones is the Ketama algorithm, originally implemented by programmers at &lt;a href="http://www.last.fm/" title="last.fm"&gt;Last.fm&lt;/a&gt; and widely adopted. Some open-source frameworks such as spymemcached and twemproxy have this algorithm built in.&lt;/p&gt;
&lt;p&gt;This article mainly analyzes the concrete implementation of the Ketama algorithm based on the spymemcached source code.&lt;/p&gt;</description></item></channel></rss>