What hash algorithm does memcached use for hash keys?

Memcached uses distributed consistent hashing to choose which server to put the key on, but which hashing algorithm it uses to match the string key in the final hash, which uses the Ketama algorithm to select the server. And how good is this algorithm for distributing similar keys to different servers.

+3
source share
1 answer

According to the source code in hash.c , memcached uses the following algorithm:

The hash function used here is Bob Jenkins, 1996:

http://burtleburtle.net/bob/hash/doobs.html

" , 1996. bob_jenkins@burtleburtle.net. , , , . ."

:

- -, , , . , .

, :

  • .
  • .
  • -.
  • 8 200 .
  • , , - .
  • , 2.
  • .
  • .

...

, - , .

, -, , . , , .

+6

All Articles