Skip to content

beefsack/go-jch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Build Status

Package jch provides an implementation of the Jump Consistent Hash consistent hashing algorithm in Go.

Consistent hashing is designed to minimise hash changes when the number of buckets is changed, and is particularly useful for data sharding. More information on consistent hashing is available at http://en.wikipedia.org/wiki/Consistent_hashing.

Jump Consistent Hash was invented by John Lamping and Eric Veach, and is described in the paper "A Fast, Minimal Memory, Consistent Hash Algorithm" (2014) available at http://arxiv.org/abs/1406.2294v1.

import "github.com/beefsack/go-jch"

func ExampleHash() {
	hash := jch.Hash(28, 5)
	fmt.Print(hash)
	// Output: 2
}

About

Jump Consistent Hash implementation in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages