-
Notifications
You must be signed in to change notification settings - Fork 303
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
Introduce dynamic throttling for NEG requests #2124
Conversation
Hi @alexkats. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @swetharepakula |
/ok-to-test |
NextDelay() (time.Duration, error) | ||
// ResetDelay resets the retry delay | ||
ResetDelay() | ||
// DecreaseDelay returns the decreased delay for next retry |
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 is kind of confusing -- does this have a side effect and also returns a value?
When will this be called etc vs ResetDelay? I think the other methods are more intuitive and their documentation is sufficient, but DecreaseDelay is somewhat out of ordinary understanding.
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.
I remember to make the same comment, I can't think on having a backoff handler that decrease, I can see how can be useful to have Reset() method to start over, but allowing to go up and down is indeed confusing
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.
The intended usage for it is inside throttling strategy (which is introduced in later commits). The dynamic strategy tries to adjust the delay based on the previous request results, and that's the place where all three methods are used, including DecreaseDelay
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, the logic looks good. Main comment is to comment both the code and the tests
4857901
to
9d82824
Compare
/retest |
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.
one comment about the metrics, otherwise 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.
one comment about the metrics, otherwise LGTM
c06446c
to
78ccdbc
Compare
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.
Thanks Alex!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexkats, swetharepakula 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 |
The purpose of this whole PR is to introduce the dynamic throttling mechanism for NEG requests (List/Attach/DetachNetworkEndpoints) that should be more flexible than static QPS rate limiter