Skip to main content

Module load_balancer

Module load_balancer 

Source
Expand description

Peer load balancer with configurable strategies.

Distributes requests across peers using RoundRobin, LeastConnections, WeightedRandom, or LowestLatency strategies, tracking per-peer load and response times via EWMA.

Structs§

AdaptiveLbStats
Aggregate statistics returned by AdaptiveLoadBalancer::stats.
AdaptiveLoadBalancer
Production-grade, multi-algorithm load balancer with dynamic weight adjustment and consistent-hash support.
LbDecision
The routing decision produced by AdaptiveLoadBalancer::select.
LbPeer
Per-peer metadata tracked by AdaptiveLoadBalancer.
LbRequest
Describes a single request to be routed.
LbStats
Aggregate load-balancer statistics.
PeerLoad
Per-peer load tracking information.
PeerLoadBalancer
Distributes requests across peers using a configurable LbStrategy.

Enums§

LbAlgorithm
Algorithm used by AdaptiveLoadBalancer to route requests.
LbStrategy
Load-balancing strategy used by PeerLoadBalancer.