Consistent Hashing is a technique invented by David Karger and colleagues their 1997 paper Consistent Hashing and Random Trees. The original use case was to create a hashing scheme for cache servers so that the cache could be safely sharded over several nodes, which minimizing the amount of entries that would need to be shifted around when a node joins or leaves the network.
consist is a simple, zero-dependency library implementing Consistent Hashing in Rust.
Here is an example of usage of the library:
```rust extern crate consist;
use consist::HashRing;
struct Server(&'static str);
fn makecache() {
let ring = HashRing::
// Search the cache
let url: &str = ...
let server = ring.get_bucket(str);
// Send a redirect to the cache server.
} ```