Client interoperability, server selection.

Tomash Brechko tomash.brechko at gmail.com
Sun Mar 9 14:56:32 UTC 2008


On Sun, Mar 09, 2008 at 13:36:25 -0000, Garrett, Russell wrote:
> What is the distribution of C::M::F like (we have a test in the Ketama
> distribution to test this)? If the distribution is fine, I think
> Ketama-with-CRC32 is probably the best way forward.

I could put together the test for C::M::F, but I guess the result
depends on the number of servers and keys (and their structure). So no
test will tell about all possible scenarios anyway.


On Sun, Mar 09, 2008 at 14:42:20 +0100, a. wrote:
> If we would change CRC32 to FNV hash (more specifically fnv-1a 
> http://isthe.com/chongo/tech/comp/fnv/#FNV-1a) , then this could be a 
> common solution for each clients.
> 
> CRC32 has very poor distribution and not really collision free.

I'm not going to advocate CRC32.  The only thing I know is that CRC32
has poor distribution in terms of _Hamming distance_ (i.e. number of
different bits in the results for similar inputs).  However this
doesn't directly apply to us: even the Hamming distance of 1 will do
if this is some high order bit.

We may use some other hash like suggested FNV-1a (though I'd say it is
fairly new (from year 2003?); it took many years to suspect flaws in
MD5 for instance).  I don't like the idea to having several hashes in
the client still, and perhaps CRC32 has sufficient distribution for
our needs, but I'm not completely against another hashes either.
Let's hear what others have to say.


-- 
   Tomash Brechko


More information about the memcached mailing list