#node #rendezvous #tagged #selection #balancer #hash-table #load-balancing

tagged-rendezvous

Rendezvous hashing with support for tag-based exclusions

2 releases

0.1.1 Aug 19, 2022
0.1.0 Aug 4, 2021

#473 in Concurrency

29 downloads per month

MIT/Apache

74KB
1K SLoC

Tagged Rendezvous

unsafe forbidden codecov docs.rs

tagged-rendezvous is a toy crate for implementing rendezvous hashing with the ability to exclude certain nodes based on a generic discriminant. This crate utilizes the algorithm described in Schindelhauer and Schomaker "Weighted Distributed Hash Tables" to provide perfect stability and weight precision in the presence of mutations.

The intended use case of this crate is to provide an ergonomic way to load-balance to potentially weighted nodes for some arbitrary input, while allowing large networks to respect geopolitical issues that often occur with global networks. In other words, it allows for nodes to provide a discriminant to exclude themselves from being selected given the need to load balance some content that may be ethically, morally, or legally impermissible.

This is useful in multiple contexts. For example, a basic CDN architecture may use this to distribute multiple nodes across multiple countries and ensure that some content will not appear in nodes where the content is considered illegal. Another example would be in scenarios of volunteer nodes for some CDN to support some network as a whole but refuse to serve certain content that is illegal in their country or content they morally object to.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

SPDX-License-Identifier: MIT OR Apache-2.0

Dependencies

~1.3–6MB
~33K SLoC