rabbah commented on a change in pull request #2360: Choose target invoker based
on specific invoker load.
URL:
https://github.com/apache/incubator-openwhisk/pull/2360#discussion_r122674264
##########
File path:
core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala
##########
@@ -277,14 +277,44 @@ class LoadBalancerService(config: WhiskConfig,
entityStore: EntityStore)(implici
case _ => false
}
val invokers = if (isBlackbox) blackboxInvokers else managedInvokers
- val (hash, count) = hashAndCountSubjectAction(msg)
+ val hash = hashSubjectAction(msg).abs
invokers.flatMap { invokers =>
val numInvokers = invokers.length
if (numInvokers > 0) {
- val hashCount = math.abs(hash + count /
activationCountBeforeNextInvoker)
- val invokerIndex = hashCount % numInvokers
- Future.successful(invokers(invokerIndex))
+ val nextInvokerThreshold =
config.loadbalancerInvokerBusyThreshold
+ val homeInvoker = hash % numInvokers
+
+ val stepSizes = coprimePrimeNumbersUntil(numInvokers)
Review comment:
mum invokers is the cardinality only not the set of indexes of
available/healthy invokers in the system, is it not?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services