Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. consistent

consistent

MITGov0.10.0

A Go library implementing consistent hashing with bounded loads for uniform key distribution and load balancing.

Visit WebsiteGitHubGitHub
775 stars77 forks0 contributors

What is consistent?

Consistent is a Go library that implements consistent hashing with bounded loads, a distributed algorithm for mapping keys to nodes in a cluster. It solves the problem of uneven load distribution and excessive data movement when nodes are added or removed, making it ideal for scalable load balancers, caches, and distributed databases.

Target Audience

Go developers building distributed systems such as caches, databases, load balancers, or any service requiring scalable and efficient key-to-node mapping.

Value Proposition

Developers choose Consistent for its strict adherence to the bounded loads algorithm, which guarantees no node is overloaded, and its production-ready performance with minimal relocation overhead during cluster changes.

Overview

Consistent hashing with bounded loads in Golang

Use Cases

Best For

  • Building distributed caching systems like Olric
  • Implementing load balancers for microservices
  • Designing scalable key-value stores
  • Creating distributed data structures in Go
  • Developing cloud-native traffic orchestration systems
  • Adding consistent hashing to Kubernetes operators

Not Ideal For

  • Systems that require dynamic adjustment of partition count after initialization
  • Projects seeking an out-of-the-box hashing solution without custom Hasher implementation
  • Applications where graceful degradation is preferred over panics during cluster overload

Pros & Cons

Pros

Bounded Load Enforcement

Guarantees no node exceeds the calculated average load, preventing hotspots as per the research-backed algorithm from Google, ensuring predictable performance in distributed systems.

High Performance Lookups

Locates key owners in constant time (252 ns/op in benchmarks) with no memory allocation during key location, making it efficient for high-throughput applications.

Minimal Relocation Overhead

Limits partition movement when nodes are added or removed, as demonstrated in the example where only 6% of partitions relocated, reducing data transfer and system churn.

Thread-Safe Design

Supports concurrent member additions, removals, and key lookups, making it suitable for production environments with multiple goroutines.

Cons

Fixed Partition Count

The number of partitions cannot be changed after creation, limiting scalability adjustments without reinitializing the entire consistent hashing ring, which can be disruptive.

No Default Hasher

Requires implementing a custom Hasher interface, adding setup complexity and potential for errors compared to libraries that provide built-in hash functions out of the box.

Panic on Overload

If all members are at maximum load, attempting to add a new member causes a panic, which may crash the application rather than offering graceful error handling or queuing mechanisms.

Frequently Asked Questions

Quick Stats

Stars775
Forks77
Contributors0
Open Issues6
Last commit2 years ago
CreatedSince 2018

Tags

#distributed-systems#go-library#hash-ring#golang#awesome#consistent-hashing#load-balancing#cluster-management#data-distribution#partitioning#awesome-go

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

Go-zeroGo-zero

A cloud-native Go microservices framework with cli tool for productivity.

Stars33,106
Forks4,307
Last commit3 days ago
go-kitgo-kit

A standard library for microservices.

Stars27,429
Forks2,442
Last commit1 year ago
KratosKratos

Your ultimate Go microservices framework for the cloud-native era.

Stars25,730
Forks4,163
Last commit2 days ago
grpc-gogrpc-go

The Go language implementation of gRPC. HTTP/2 based RPC

Stars22,962
Forks4,694
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub