You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cb...@apache.org on 2018/05/03 11:08:28 UTC
[incubator-openwhisk] branch master updated: Make limit overcommit
relative to the actual cluster size. (#3592)
This is an automated email from the ASF dual-hosted git repository.
cbickel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new d3a0bb4 Make limit overcommit relative to the actual cluster size. (#3592)
d3a0bb4 is described below
commit d3a0bb48faf82a668ad9dc7eecf6f9b630c6189c
Author: Markus Thömmes <ma...@me.com>
AuthorDate: Thu May 3 13:08:25 2018 +0200
Make limit overcommit relative to the actual cluster size. (#3592)
The overcommit of limits needs to be relative to the actual size of the cluster to appropriately scale those limits.
---
.../src/main/scala/whisk/core/entitlement/Entitlement.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
index 478bda4..031c267 100644
--- a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
+++ b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
@@ -67,8 +67,7 @@ protected[core] object EntitlementProvider {
WhiskConfig.actionInvokePerMinuteLimit -> null,
WhiskConfig.actionInvokeConcurrentLimit -> null,
WhiskConfig.triggerFirePerMinuteLimit -> null,
- WhiskConfig.actionInvokeSystemOverloadLimit -> null,
- WhiskConfig.controllerInstances -> null)
+ WhiskConfig.actionInvokeSystemOverloadLimit -> null)
}
/**
@@ -86,8 +85,8 @@ protected[core] abstract class EntitlementProvider(
* Allows 20% of additional requests on top of the limit to mitigate possible unfair round-robin loadbalancing between
* controllers
*/
- private val overcommit = if (config.controllerInstances.toInt > 1) 1.2 else 1
- private def dilateLimit(limit: Int): Int = Math.ceil(limit.toDouble * overcommit).toInt
+ private def overcommit(clusterSize: Int) = if (clusterSize > 1) 1.2 else 1
+ private def dilateLimit(limit: Int): Int = Math.ceil(limit.toDouble * overcommit(loadBalancer.clusterSize)).toInt
/**
* Calculates a possibly dilated limit relative to the current user.
--
To stop receiving notification emails like this one, please contact
cbickel@apache.org.