Class WeightedStrategy
Weighted round-robin load balancer strategy.
Endpoints with higher weights receive proportionally more traffic.
Thread-safe via lock-free .
public sealed class WeightedStrategy : ILoadBalancerStrategy
Inheritance
Implements
Methods
Select(IExchange, IReadOnlyList<string>)
Selects the next endpoint using weighted round-robin.
public string Select(IExchange exchange, IReadOnlyList<string> endpoints)
Constructors
WeightedStrategy(IReadOnlyList<(string Uri, int Weight)>)
Creates a weighted strategy from endpoint-weight pairs.