openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

How do you limit the concurrent activations with multiple Controller?

Open hykych opened this issue 9 years ago • 3 comments

I noticed that you use the activationByNamespaceId in LoadBalancerData to count the concurrent activations.
However, this is invalid with multiple Controller. Is there anything I didn't noticed or I made a mistake on that code snippet?

hykych avatar Oct 16 '17 03:10 hykych

Hi @hykych!

basically there are two ways you deploy controllers: active-passive (one controller is active, another one becomes active if the first one fails), active-active (requests are dispatched for multiple controllers simultaneously). I think you mentioned the second case. So for that we use akka cluster to share the number of activations per namespace and activations per invoker across cluster members. You could look it up here: https://github.com/apache/incubator-openwhisk/blob/master/core/controller/src/main/scala/whisk/core/loadBalancer/DistributedLoadBalancerData.scala

and here is where we enable this class: https://github.com/apache/incubator-openwhisk/blob/master/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala#L105

vvraskin avatar Oct 16 '17 15:10 vvraskin

@hykych @vvraskin I just logged #2859 - is this possibly related?

tysonnorris avatar Oct 16 '17 18:10 tysonnorris

@vvraskin thanks

hykych avatar Oct 17 '17 01:10 hykych