Class HelixLeastLoadedGroupRoutingStrategy


public class HelixLeastLoadedGroupRoutingStrategy extends HelixGroupRoutingStrategy
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.
  • 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 class HelixGroupRoutingStrategy