Expand description

This crate is a proof of concept for node selection based on a logarithmic rendezvous hashing implementation that allows nodes to self-exclude based on a generic type. While this is still a proof of concept, performance should be good enough for small to medium-sized implementations.

Note that this implementation does not include any caching mechanism. This is intentional, and is done to keep the implementation as simple as possible. Users of this crate should implement their own caching mechanism for best performance and evict on mutation, but this is not necessary, especially in small use cases.

This implementation assumes that the typical use case is on some load-balancing node or equivalent, and that it is aware of nodes are available or unavailable. Additionally, it should be able to determine the weight of each node.

The entry point of this crate is NodeSelection or BitNodeSelection. Examples of construction and usage are included in their respective documentation.

Re-exports

pub use dashmap;

Structs

Like Node, but optimized for bitflags.

Like NodeSelection, but specialized for bitflags.

A duplicate id was provided. This contains the duplicated ID that was provided.

A representation of logical node in some system.

An opaque representation of a node ID.

Provides a way to consistently select some weighted bucket (or node) given some value.