Class HelixLeastLoadedGroupRoutingStrategy
java.lang.Object
com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
com.linkedin.venice.fastclient.meta.HelixGroupRoutingStrategy
com.linkedin.venice.fastclient.meta.HelixLeastLoadedGroupRoutingStrategy
This class is used to route requests to the least loaded group based on the response time collected in the past.
So far, it only tracks the response time of multi-key requests.
-
Field Summary
Fields inherited from class com.linkedin.venice.fastclient.meta.HelixGroupRoutingStrategy
helixGroupInfoAtomicReference, helixGroupStats, instanceHealthMonitor
-
Constructor Summary
ConstructorsConstructorDescriptionHelixLeastLoadedGroupRoutingStrategy
(InstanceHealthMonitor instanceHealthMonitor, io.tehuti.metrics.MetricsRepository metricsRepository, String storeName) -
Method Summary
Modifier and TypeMethodDescriptionint
getHelixGroupId
(long requestId, int groupIdForOriginalRequest) Get the least loaded group based on the response time collected in the past.Methods inherited from class com.linkedin.venice.fastclient.meta.HelixGroupRoutingStrategy
getGroupCount, getReplicas, trackRequest, updateHelixGroupInfo
-
Constructor Details
-
HelixLeastLoadedGroupRoutingStrategy
public HelixLeastLoadedGroupRoutingStrategy(InstanceHealthMonitor instanceHealthMonitor, io.tehuti.metrics.MetricsRepository metricsRepository, String storeName)
-
-
Method Details
-
getHelixGroupId
public int getHelixGroupId(long requestId, int groupIdForOriginalRequest) Get the least loaded group based on the response time collected in the past.- Overrides:
getHelixGroupId
in classHelixGroupRoutingStrategy
-