Class WeightedStrategy

Assembly: redb.Route.dll

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

Object→WeightedStrategy

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.