The loadbalancer currently separates the blackbox and managed pools, but
when you deploy openwhisk with HA enabled (two invokers), some users are
surprised that the second invoker gets no load.
This is because of the blackbox invoker fraction with a minimum of 1
invoker if there are N >= 2 invokers in the system. [1]
val managed = Math.max(1, newSize - blackboxes)
val blackboxes = Math.max(1, (newSize.toDouble *
blackboxFraction).toInt)
I opened a PR that allows the loadbalancer to utilize all the invokers for
managed runtimes, until there are a sufficient number of invokers added (10
for 10% fraction, in general, the reciprocal of the faction). [2]
val managed = Math.max(1, Math.ceil(newSize.toDouble * (1 -
blackboxFraction)).toInt)
val blackboxes = Math.max(1, Math.floor(newSize.toDouble *
blackboxFraction).toInt)
So for a basic HA deployment with 2 invokers, there will be 2 for managed
runtimes, and 1 for blackbox.
Thoughts and feedback?
-r
[1] https://github.com/apache/incubator-openwhisk/blob/6a5ef98d80c5b1f857ef8baaef93b522662a88ef/core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala#L427-L428
[2] https://github.com/apache/incubator-openwhisk/pull/3751