Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for consistent hashing, using the libketama algorithm.
We build a weighted continuum of server mappings. Each key hashes to a value and we find the closest server in the continuum to that value. Now if we add a server, only 1/total keys will map to a different server, dramatically reducing the impact of the addition.
- Loading branch information
Showing
2 changed files
with
110 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters