pub struct Rendezvous { /* private fields */ }Expand description
Weighted Rendezvous (Highest Random Weight) hashing.
For an affinity key, the chosen backend is the one maximizing a stable,
per-(key, backend) score. With no key it degrades to plain round-robin.
§Weighting
We use the standard continuous weighted-rendezvous score (Schindelhauer–Schomaker / “logarithmic method”):
score(key, backend) = -weight / ln(h)where h = hash64(seed, key, backend_addr) / 2^64 ∈ (0, 1). Because
ln(h) < 0, the score is positive and grows with weight, so heavier
backends win proportionally more keys while the choice stays deterministic
and minimally disruptive: removing a non-winning backend cannot change the
winner, and adding one only steals the keys for which it now scores highest.
Selection is O(N) per key.
Implementations§
Trait Implementations§
Source§impl Debug for Rendezvous
impl Debug for Rendezvous
Source§impl Default for Rendezvous
impl Default for Rendezvous
Auto Trait Implementations§
impl Freeze for Rendezvous
impl RefUnwindSafe for Rendezvous
impl Send for Rendezvous
impl Sync for Rendezvous
impl Unpin for Rendezvous
impl UnsafeUnpin for Rendezvous
impl UnwindSafe for Rendezvous
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more