-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Updated error responses around rate limiting to be more descriptive#4972
Updated error responses around rate limiting to be more descriptive#4972rraavi wants to merge 2 commits intoapache:masterfrom
Conversation
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.
|
Waiting on a stable master, converting PR to draft till then :) |
| /** 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)." |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in dc3ec0f
7e61b7c to
c32ec0d
Compare
c32ec0d to
4f08b4c
Compare
|
@dgrove-oss @bdoyle0182 @mrutkows tagging folks for review! Note: Travis timed out running |
4f08b4c to
75eb1ae
Compare
|
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... |
75eb1ae to
43cfb90
Compare
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. |
43cfb90 to
6f27606
Compare
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 |
| /** 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)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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)." |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
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. |
mrutkows
left a comment
There was a problem hiding this 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.
|
So, close the linked PR right? |
|
I have little idea about the history of this PR. |