-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
RLQS: Refactor traffic processing in the RLQS filter & fix a broken expiration check #35723
Conversation
…ed false-positive) expiration check Signed-off-by: Brian Surber <bsurber@google.com>
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.
Thank you! Left some comments from a quick first pass.
If possible, I would suggest having this PR only for fixing the expiration check and leaving the refactor into separate PR.
Also please fix the format so that CI can run. You can use command /wait |
Signed-off-by: Brian Surber <bsurber@google.com>
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.
Mostly LGTM modulo the open threads and code coverage
Thanks!
} | ||
if (ret_status == Envoy::Http::FilterHeadersStatus::StopIteration) { | ||
sendDenyResponse(); | ||
quota_buckets_[bucket_id]->quota_usage.num_requests_denied += 1; |
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.
Overall, I feel updating the allow/deny stats based on ret_status is not robust. The reason it works here is because our RLQS filter is in non-blocking fashion that it will not wait for response from RLQS server.
StopIteration
in Envoy generally could represent that filter is waiting for the remote server response before continuing, rather than tightly tied with localReply/reject.
Thus, can we update the quota_usage inline inside of the functions above when the request is determined to be ALLOW or Throttled.
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.
We've addressed this internally without too much to say. It'll do for now as that would be a bit of future-proofing for an unknown problem at the cost of additional refactoring.
Signed-off-by: Brian Surber <bsurber@google.com>
/wait |
…to the default-action Signed-off-by: Brian Surber <bsurber@google.com>
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!
@phlax Thanks for notification! Could you please highlight which test is flaky? so that we can resolve/revert it accordingly |
same test timed out twice on that run - but its happening a lot (if sporadically) elsewhere |
Hm, I had seen |
…xpiration check v2 (#35973) Commit Message: Refactor the RLQS filter's traffic processing & fix the broken action-assignment expiration check. Additional Description: Addresses flakiness from [past PR](#35723) by adding a missing `sendDenyResponse` & improving test consistency in asynchronous steps. Risk Level: Minor Testing: Integration and unit testing run 1k times to check flakiness --------- Signed-off-by: Brian Surber <bsurber@google.com>
Commit Message: Refactor the RLQS filter's traffic processing & fix the broken action-assignment expiration check.
Additional Description:
Current behavior:
Risk Level: minor - filter is in-development and currently in a broken state
Testing:
Docs Changes:
Release Notes:
Platform Specific Features: