-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement LoadBalancer Strategy based on annotation #5091
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5091 +/- ##
===========================================
- Coverage 82.80% 29.03% -53.78%
===========================================
Files 207 207
Lines 10034 10068 +34
Branches 444 449 +5
===========================================
- Hits 8309 2923 -5386
- Misses 1725 7145 +5420
Continue to review full report at Codecov.
|
@vrann can you move the description to an issue and then we can link the PR to the issue - this is to separate any potential discussion from the code review 🙏 |
@rabbah ah, yes, would do that |
With the current architecture of openwhisk, the load balancers push activations to invokers without state knowledge of what's going on in each invoker. So I'm not sure based on that if this can be implemented without each load balancer stepping on the toes of one another if you're defining what load balancer to use at the action level. You would need to split up invoker pools to separate different load balancers affecting each other or share state between all load balancers. I'm curious what changes you're working on. We've had similar desire to improve the load balancer, but with the forthcoming re-architecture of activation scheduling that's in progress; we've put off doing any improvements to the load balancer using the push model waiting for the new pull based model. I guess we can discuss this in the issue |
- implemented MuxLoadBalancer to dynamically select load balancing strategy based on annotation of the action
- switched on MuxBalancer for the standalone
Codecov Report
@@ Coverage Diff @@
## master #5091 +/- ##
==========================================
+ Coverage 37.25% 37.41% +0.15%
==========================================
Files 211 212 +1
Lines 10435 10452 +17
Branches 450 445 -5
==========================================
+ Hits 3888 3911 +23
+ Misses 6547 6541 -6
Continue to review full report at Codecov.
|
Fix for #5097
Description
This change allows selecting custom Load Balancing strategies based on the annotation of the action. I introduced the new MuxBalancer. When action is created, a developer can specify "activationStrategy" annotation. If OpenWhisk is configured to use MuxBalancer, it will pick up the annotation value and will look in the map of the configured activation strategies for that alias. In case if the alias is found, it will delegate the publishing of the activation to the LoadBalancer corresponding to the alias. Otherwise, MuxBalancer will use the "default" Load Balancer to delegate the publication.
The configuration of the MuxBalancer looks like folloving:
a developer would use it in the following way:
wsk action create hello hello.js --annotation activationStrategy activationStrategyName1
Breaking change?
It is not a breaking change, because the support for activation strategy annotation would be enabled only if MuxBalancer is selected as a default Load Balancer. And only in that case, the
strategy
node of the configuration needs to be configured. Otherwise, system does not use it.Related issue and scope
My changes affect the following components
Types of changes
Checklist:
anges. -->
Related issue and scope
My changes affect the following components
Types of changes
Checklist: