consistenthash alternatives and similar packages
Based on the "Distributed Systems" category.
Alternatively, view consistenthash alternatives based on common mentions on social networks and blogs.
-
Nomad
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations. -
go-zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity. [Moved to: https://github.com/zeromicro/go-zero] -
rpcx
Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! ๐๐๐ฏ๐ๆ๐๐ฎ๐๐๐จ, ๐๐จ๐ฅ๐๐ง๐ ๆ๐ซ๐ฉ๐๐ฑ! build for cloud! -
Encore
Encore is the Backend Development Platform purpose-built to help you create event-driven and distributed systems. -
gleam
Fast, efficient, and scalable distributed map/reduce system, DAG execution, in memory or on disk, written in pure Go, runs standalone or distributedly. -
glow
Glow is an easy-to-use distributed computation system written in Go, similar to Hadoop Map Reduce, Spark, Flink, Storm, etc. I am also working on another similar pure Go system, https://github.com/chrislusf/gleam , which is more flexible and more performant. -
Olric
Distributed in-memory object store. It can be used as an embedded Go library and a language-independent service. -
Dragonfly
Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project. -
go-doudou
go-doudou๏ผdoudou pronounce /dษudษu/๏ผis OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well. -
resgate
A Realtime API Gateway used with NATS to build REST, real time, and RPC APIs, where all your clients are synchronized seamlessly. -
go-sundheit
A library built to provide support for defining service health for golang services. It allows you to register async health checks for your dependencies and the service itself, provides a health endpoint that exposes their status, and health metrics. -
Maestro
Take control of your data, connect with anything, and expose it anywhere through protocols such as HTTP, GraphQL, and gRPC. -
celeriac
Golang client library for adding support for interacting and monitoring Celery workers, tasks and events. -
drmaa
Compute cluster (HPC) job submission library for Go (#golang) based on the open DRMAA standard.
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of consistenthash or a related project?
Popular Comparisons
README
Consistent Hashing
A Go library that implements Consistent Hashing
This package is implemented based on golang/groupcache package with some improvements
Definitions in this README:
node
: Refers to the key which is going to be stored in the hash ring or hash table
rKey
: Refers to the request hash which is not going to be stored, it's used to find the upper closest node in the hash ring to the rKey
Improvements:
Remove
function added - sort and remove a node from the hash ring- int hashes replaced with uint32
- Number of replicas is now configurable while adding new node
Note: This is useful when capacity is not the same for all nodes
Usage
import (
chash "github.com/mbrostami/consistenthash"
)
// Create ConsistentHash with 2 replicas
ch := chash.NewConsistentHash(2, nil)
ch.Add("127.0.0.1:1001") // node 1
ch.Add("127.0.0.1:1002") // node 2
ch.AddReplicas("127.0.0.1:1003", 4) // node3 has more capacity so possibility to get assigned request is higher than other nodes
rKey := "something like request url"
node := ch.Get(rKey) // find upper closest node
fmt.println(node) // this will print out one of the nodes
Test
Benchmark
go test -bench=.
Race Condition
go test --race
Thanks to Mohammad Rajabloo for reporting the race issue
Tests
go test