algo.LeastWorkLoadBalancer()
Description
Creates an instance of LeastWorkLoadBalancer.
Syntax
new algo.LeastWorkLoadBalancer([ ...targets ])new algo.LeastWorkLoadBalancer({ ...weightedTargets })
Parameters
new algo.LeastWorkLoadBalancer(targets, unhealthy?)
targetsunhealthy?
An array of strings representing the targets, or an object of key-value pairs where keys are the targets and values are the weights.
A Cache object storing unhealthy targets.
Return Value
A LeastWorkLoadBalancer object with the specified targets.