-
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
Add a new stat metric in queue to prevent double counting #3477
Conversation
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.
@hohaichi: 0 warnings.
In response to this:
Currently a request pending in both the activator and queue proxy is counted twice, once in the activator, and one in the queue proxy. This change fixes it by letting queue report a concurrency metric for proxied requests and letting the autoscaler discount such concurrency when it calculates the total concurrency for scaling decision.
Fixes #3301
Proposed Changes
- Add a new Knative header for tracking where a request goes through. And let the activator use it to mark proxied requests.
- Let queue report a new metric for the average concurrency of requests proxied through activator.
- Autoscaler discount the average proxied concurrency from the average concurrency from queue when it calculate the total concurrency for scaling decision.
Release Note
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
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.
In general looks fine.
But it still has the same attack vector that the underlying issue talks about.
Perhaps the header should be dynamic?
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.
Very neat execution, thanks! Left a few comments throughout.
|
Currently a request pending in both the activator and queue proxy is counted twice, once in the activator, and one in the queue proxy. This change fixes it by letting queue report a concurrency metric for proxied requests and letting the autoscaler discount such concurrency when it calculates the total concurrency for scaling decision.
Updated with tests and rebased. |
/assign @mdemirhan |
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.
A few nits.
Rest is fine with me.
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.
Generally LGTM but a few comments on naming and adding comments describing the values.
/assign @yanweiguo |
The following is the coverage report on pkg/.
|
/lgtm |
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.
/approve
/lgtm
Thanks for all the adjustments 🎉
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hohaichi, markusthoemmes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Currently a request pending in both the activator and queue proxy is counted twice, once in the activator, and one in the queue proxy. This change fixes it by letting queue report a concurrency metric for proxied requests and letting the autoscaler discount such concurrency when it calculates the total concurrency for scaling decision.
Fixes #3301
Proposed Changes
Release Note