Skip to content

add per min throttling support to fpc #5241

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

Merged
merged 1 commit into from
May 24, 2022

Conversation

bdoyle0182
Copy link
Contributor

Description

Could use some help verifying this actually works as I'm not totally familiar with the entitlement code path, but I'm pretty sure I have what is needed here since the FPCEntitlementProvider just extends from the original overriding the checkThrottles.

So FPC currently doesn't support per minute throttling of namespaces. While the system no longer needs these throttles to protect itself with the new fpc scheduler enhancement, it is still a valuable feature to allow for user functions to protect their downstream by having reasonable per minute limits. And it's just a feature that I think is unnecessarily lost if still needed for certain use cases. Ideally people can slowly move away from using this feature, but having the option at least available makes it easier for people to more quickly migrate to fpc from their existing cluster that might be dependent on it.

Since the contributors of FPC to the open source repository do not use the feature, I've set the default config value to not include the per minute throttling. I personally think the default should probably be to have it still turned on right now, but I will let them decide on that.

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • 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

  • 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:

  • I signed an Apache CLA.
  • I reviewed the style guides 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.

@bdoyle0182 bdoyle0182 requested a review from style95 May 21, 2022 03:23
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2022

Codecov Report

Merging #5241 (2d4fd18) into master (3e3414c) will increase coverage by 29.82%.
The diff coverage is 16.66%.

@@             Coverage Diff             @@
##           master    #5241       +/-   ##
===========================================
+ Coverage   44.53%   74.36%   +29.82%     
===========================================
  Files         238      238               
  Lines       13957    13971       +14     
  Branches      570      563        -7     
===========================================
+ Hits         6216    10389     +4173     
+ Misses       7741     3582     -4159     
Impacted Files Coverage Δ
...pache/openwhisk/core/entitlement/Entitlement.scala 81.81% <ø> (+81.81%) ⬆️
...he/openwhisk/core/entitlement/FPCEntitlement.scala 0.00% <0.00%> (ø)
.../openwhisk/core/loadBalancer/FPCPoolBalancer.scala 33.73% <ø> (ø)
.../scala/org/apache/openwhisk/core/WhiskConfig.scala 95.78% <100.00%> (+0.02%) ⬆️
...whisk/connector/kafka/KafkaConsumerConnector.scala 59.15% <0.00%> (-22.54%) ⬇️
.../scala/org/apache/openwhisk/utils/Exceptions.scala 20.00% <0.00%> (-20.00%) ⬇️
...whisk/connector/kafka/KafkaProducerConnector.scala 60.97% <0.00%> (-19.03%) ⬇️
...pache/openwhisk/core/invoker/InvokerReactive.scala 54.33% <0.00%> (-18.90%) ⬇️
...apache/openwhisk/core/ack/MessagingActiveAck.scala 58.33% <0.00%> (-8.34%) ⬇️
...pache/openwhisk/core/containerpool/Container.scala 89.65% <0.00%> (-1.15%) ⬇️
... and 142 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e3414c...2d4fd18. Read the comment docs.

Copy link
Contributor

@jiangpengcheng jiangpengcheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great

@bdoyle0182 bdoyle0182 merged commit 0912c73 into apache:master May 24, 2022
JesseStutler pushed a commit to JesseStutler/openwhisk that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants