vrann opened a new pull request #5091:
URL: https://github.com/apache/openwhisk/pull/5091


   ## 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:
   
   ```
   whisk.loadbalancer {
       strategy {
         default = "fully.qualified.class.name.for. LoadBalancer0"
         custom = {
              "activationStrategyName1" = "fully.qualified.class.name.for. 
LoadBalancer1"
              "activationStrategyName2" = "fully.qualified.class.name.for. 
LoadBalancer2"
               ...
         }
       }
   }
   ```
   
   a developer would use it in the following way:
   `wsk action create hello hello.js --annotation activationStrategy 
activationStrategyName1`
   
   ### Why this change is important for us
   
   When working on the new mechanism of processing of the activations we 
haven't found a better extension point on where it could be plugged into the 
system other than changing the logic of Load Balancer. This motivates us to 
introduce a mechanism that would allow selecting the Load Balancers based on 
some characteristics of activations. We considered kind as one possibility for 
such characteristic, and it could be added later. For now, annotation looks 
like the most straightforward way (with fewer drawbacks)
   
   ### 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
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [x] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the 
boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [x] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered 
all aspects of the change you're making. -->
   
   - [ ] I signed an [Apache 
CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [x] I added tests to cover my changes.
   - [x] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   anges. -->
   <!--- Include details of what problem you are solving and how your changes 
are tested. -->
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Scheduler
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the 
boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered 
all aspects of the change you're making. -->
   
   - [ ] I signed an [Apache 
CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
   - [ ] I reviewed the [style 
guides](https://github.com/apache/openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to