Crates.io | power-consistent-hash |
lib.rs | power-consistent-hash |
version | 0.1.0 |
source | src |
created_at | 2023-08-11 18:49:27.701455 |
updated_at | 2023-08-11 18:49:27.701455 |
description | Power consistent hash - constant expected time constant memory consistent hash |
homepage | |
repository | https://github.com/DXist/power-consistent-hash |
max_upload_size | |
id | 942197 |
size | 29,747 |
This repo contains implementation of power consistent hash - constant expected time and constant memory consistent hashing. Minimal number of keys are remapped when the number of buckets changes.
Target use cases - load balancing and data sharding.
The hashing algorithm execution time doesn't depend on number of hashing time.
2.6GHz Intel Core i7 hashes 1k 64 bit keys in ~6.4 microseconds. The left axis is a number of consistent hash buckets:
With optional integration of SeaHash to produce 64 bit key fingerprints hashing of 1k UUIDs takes around ~25 microseconds.