pub enum LoadBalancerAlgorithm {
Random,
RoundRobin,
LeastConnections,
TwoRandomChoices,
}Expand description
Backend selection strategy used when multiple upstreams are configured.
Variants§
Random
Selects a backend randomly for each request.
RoundRobin
Cycles through backends in order.
LeastConnections
Selects the backend with the least active tracked connections.
TwoRandomChoices
Chooses two random backends and picks the less loaded one.
Trait Implementations§
Source§impl Clone for LoadBalancerAlgorithm
impl Clone for LoadBalancerAlgorithm
Source§fn clone(&self) -> LoadBalancerAlgorithm
fn clone(&self) -> LoadBalancerAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Hash for LoadBalancerAlgorithm
impl Hash for LoadBalancerAlgorithm
Source§impl PartialEq for LoadBalancerAlgorithm
impl PartialEq for LoadBalancerAlgorithm
impl Copy for LoadBalancerAlgorithm
impl Eq for LoadBalancerAlgorithm
impl StructuralPartialEq for LoadBalancerAlgorithm
Auto Trait Implementations§
impl Freeze for LoadBalancerAlgorithm
impl RefUnwindSafe for LoadBalancerAlgorithm
impl Send for LoadBalancerAlgorithm
impl Sync for LoadBalancerAlgorithm
impl Unpin for LoadBalancerAlgorithm
impl UnwindSafe for LoadBalancerAlgorithm
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.