Skip to content

A Rust implementation of Consistent hashing algorithm

License

Notifications You must be signed in to change notification settings

sile/consistent_hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consistent_hash

Crates.io: consistent_hash Build Status License: MIT

A Rust implementation of Consistent hashing algorithm.

Documentation

Currently this crate only provides statically built, virtual node based hash rings.

An Informal Benchmark

$ cat /proc/cpuinfo  | grep 'model name' | head -1
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz

$ uname -a
Linux ubuntu 4.8.0-34-generic #36-Ubuntu SMP Wed Dec 21 17:24:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ cargo run --release --example bench -- /usr/share/dict/words --vnode_count 1000 --nodes Rust Alef C++ Camlp4 CommonLisp Erlang Haskell Hermes Limbo Napier Napier88 Newsqueak NIL Sather StandardML

WORD COUNT: 99156
REAL NODE COUNT: 15
VIRTUAL NODE COUNT: 15000 (1000 per node)

SELECTED COUNT PER NODE:
- Rust:         6265
- NIL:  6642
- Sather:       7165
- Erlang:       6545
- Camlp4:       6912
- Napier88:     6287
- CommonLisp:   6901
- C++:  6504
- StandardML:   6937
- Hermes:       6166
- Newsqueak:    6725
- Alef:         6586
- Haskell:      6240
- Limbo:        6754
- Napier:       6527

ELAPSED: 18 ms
WORDS PER SECOND: 5342456

About

A Rust implementation of Consistent hashing algorithm

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages