Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:45:47+00:00 2026-06-03T04:45:47+00:00

Memcached uses distributed consistent hashing to choose which server to put a key on

  • 0

Memcached uses distributed consistent hashing to choose which server to put a key on but which hashing algo does it use to map string key into the final hash on which the Ketama algo is applied for server selection. And how good is that algo at spreading similar keys to different servers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:45:49+00:00Added an answer on June 3, 2026 at 4:45 am

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

    The hash function used here is by Bob Jenkins, 1996:

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

    “By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net.
    You may use this code any way you wish, private, educational,
    or commercial. It’s free.”

    From Bob Jenkins’ website:

    I offer you a new hash function for hash table lookup that is faster and more thorough than the one you are using now. I also give you a way to verify that it is more thorough.

    Also, his requirements are:

    • The keys are unaligned variable-length byte arrays.
    • Sometimes keys are several such arrays.
    • Sometimes a set of independent hash functions were required.
    • Average key lengths ranged from 8 bytes to 200 bytes.
    • Keys might be character strings, numbers, bit-arrays, or weirder things.
    • Table sizes could be anything, including powers of 2.
    • The hash must be faster than the old one.
    • The hash must do a good job.

    …

    The real requirement then is that a good hash function should distribute hash values uniformly for the keys that users actually use.

    To get back to your other question, he measured the ability of the algorithm to uniformly distribute hash values, so I would presume that the hash does a good job at spreading similar keys to different servers. If you have concerns, the code is isolated so you should be able to run your own tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python-memcached is the official supported memcached driver for Django. Does it support Consistent hashing
I have a perl script that uses the CGI::Session::Drive::memcached, but I want to be
On an ubuntu server, I have a drupal site which uses nginx+fastcgi as webserver
I use capistrano to deploy my app to a machine that uses memcache. I
I know how memcached works. How does Hadoop work?
I need to replicate memcached to another key value system (couchbase). How can I
I know memcached but i dont familiar with mysql ndb cluster with memcached.i want
I've got a view in Django that uses memcached to cache data for the
Memcached says it uses an LRU queue to do eviction (with a few rules
I'd like to use memcached in my java web application, and after some digging

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.