Skip to content
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

Updated error responses around rate limiting to be more descriptive #4972

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rraavi
Copy link
Contributor

@rraavi rraavi commented Sep 9, 2020

Description

Addressing issue #4798. Minor update.

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

@rraavi
Copy link
Contributor Author

rraavi commented Sep 9, 2020

Waiting on a stable master, converting PR to draft till then :)

@rraavi rraavi marked this pull request as draft September 9, 2020 16:09
@@ -68,11 +68,11 @@ object Messages {

/** Standard message for too many activation requests within a rolling time window. */
def tooManyRequests(count: Int, allowed: Int) =
s"Too many requests in the last minute (count: $count, allowed: $allowed)."
s"Too many requests in the last minute (currently running: $count, allowed per minute: $allowed)."
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be currently running as it's just a per minute throttle limit, not concurrency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted in dc3ec0f

@rraavi rraavi force-pushed the update-error-responses branch 3 times, most recently from 7e61b7c to c32ec0d Compare September 10, 2020 17:15
@rraavi rraavi marked this pull request as ready for review September 10, 2020 18:14
@rraavi rraavi marked this pull request as draft September 10, 2020 18:19
@rraavi rraavi force-pushed the update-error-responses branch from c32ec0d to 4f08b4c Compare September 10, 2020 19:10
@rraavi rraavi marked this pull request as ready for review September 10, 2020 20:28
@rraavi
Copy link
Contributor Author

rraavi commented Sep 10, 2020

@dgrove-oss @bdoyle0182 @mrutkows tagging folks for review!

Note: Travis timed out running ./tools/travis/checkAndUploadLogs.sh system command for System Tests job (I couldn't see a way to kick off a new CI build manually)

@rraavi rraavi force-pushed the update-error-responses branch from 4f08b4c to 75eb1ae Compare September 11, 2020 13:31
@mrutkows
Copy link
Contributor

Is there a way to also show the discrete # (perhaps use the same internal config. value the controller uses) to be as descriptive as possible? That is fully address Dave's suggestion in the issue, i.e., "or simply show the total allowed over all the controllers (in this case, 5 controllers (5*240=1200)". I suspect operators would love to be reminded of the configured limits when a user presents them with this error...

@rraavi rraavi force-pushed the update-error-responses branch from 75eb1ae to 43cfb90 Compare September 11, 2020 18:49
@bdoyle0182
Copy link
Contributor

Is there a way to also show the discrete # (perhaps use the same internal config. value the controller uses) to be as descriptive as possible? That is fully address Dave's suggestion in the issue, i.e., "or simply show the total allowed over all the controllers (in this case, 5 controllers (5*240=1200)". I suspect operators would love to be reminded of the configured limits when a user presents them with this error...

I agree I think this is probably the biggest thing we want as to what's misleading. I'm not sure if the current clustering can actually support something like this though or not.

@rraavi rraavi force-pushed the update-error-responses branch from 43cfb90 to 6f27606 Compare September 26, 2020 00:31
@rraavi
Copy link
Contributor Author

rraavi commented Sep 26, 2020

Is there a way to also show the discrete # (perhaps use the same internal config. value the controller uses) to be as descriptive as possible? That is fully address Dave's suggestion in the issue, i.e., "or simply show the total allowed over all the controllers (in this case, 5 controllers (5*240=1200)". I suspect operators would love to be reminded of the configured limits when a user presents them with this error...

Team, unfortunately this is my first time working with Scala.. I tried to follow along the code but wasn't entirely sure. Are we referring to leverage clusterSize property of LoadBalancer to compute and show the discrete count? I noticed another property named totalActiveActivations.. is this something we can use?

@@ -72,7 +72,7 @@ object Messages {

/** Standard message for too many concurrent activation requests within a time window. */
def tooManyConcurrentRequests(count: Int, allowed: Int) =
s"Too many concurrent requests in flight (count: $count, allowed: $allowed)."
s"Too many concurrent requests in flight (currently running: $count, allowed per controller: $allowed)."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
s"Too many concurrent requests in flight (currently running: $count, allowed per controller: $allowed)."
s"Too many concurrent requests (count in window: $count, allowed per controller: $allowed)."

Copy link
Member

Choose a reason for hiding this comment

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

Suggest a change to address @bdoyle0182 's comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dgrove-oss @bdoyle0182 @mrutkows suggested a change in a separate PR linked below to keep it clean. I'll just close the other PR if I'm on the wrong track ;)

Copy link
Member

Choose a reason for hiding this comment

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

@rabbah - do you have any thoughts? This is a part of the controller I don't know very well.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM.

@rabbah
Copy link
Member

rabbah commented Oct 7, 2020

As noted by @dgrove-oss and @bdoyle0182 each controller lacks total knowledge about the activation counts per namespace. This message will even vary per controller depending on which services the request. So the "currently running" count is for the specific controller that was assigned the activation.

Copy link
Contributor

@mrutkows mrutkows left a comment

Choose a reason for hiding this comment

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

LGTM... achieves immediacy of ack. multiple controllers.

@rraavi
Copy link
Contributor Author

rraavi commented Oct 9, 2020

So, close the linked PR right?

@style95
Copy link
Member

style95 commented Nov 14, 2020

I have little idea about the history of this PR.
Is this ready to merge?

@style95 style95 added the stale old issue which needs to validate label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale old issue which needs to validate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants