You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwhisk.apache.org by Rodric Rabbah <ro...@gmail.com> on 2018/06/12 12:11:27 UTC

managed and blackbox invoker pools for small N

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

Re: managed and blackbox invoker pools for small N

Posted by Rodric Rabbah <ro...@gmail.com>.
I'm not sure what happened with the link formatting, here they are again:

[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


-r