Class HelixGroupLeastLoadedStrategy

java.lang.Object
com.linkedin.venice.router.api.routing.helix.HelixGroupLeastLoadedStrategy
All Implemented Interfaces:
HelixGroupSelectionStrategy

public class HelixGroupLeastLoadedStrategy extends Object implements HelixGroupSelectionStrategy
This strategy is tried to distribute more load to Helix Groups with more capacity. Since the qps to a specific Router is not that high, so it is acceptable to use synchronized method here. TODO: if we notice a performance issue with the synchronized implementation, we could tune it better to use Atomic data structures by sacrificing the accuracy. This class is also leveraging TimeoutProcessor to handle potential group counter leaking issue.