-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
[CapMan visibility] add throttling to ReferrerGuardRail policy #6014
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.
good overall just one change
How are you planning to roll this out? |
In this PR, I set the throttle dividers to 1 so that the rejection threshold and the throttle threshold are the same, so effectively this PR will create the options on Snuba Admin without doing any throttling. Then, within S4S, I will adjust the throttle dividers. With this, I expect to see queries being throttled in DD under the metric |
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 1614 tests with View the full list of failed tests
|
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.
attached some suggestions for changes, but fundamentally the concept and approach seem sound
https://getsentry.atlassian.net/browse/SNS-2793
The ReferrerGuardRail policy prevents referrers from sending too many queries by rejecting them once a referrer reaches a rejection threshold. I add a throttle threshold so the offending referrer will get throttled first before getting rejected. ReferrerGuardRailPolicy will half the threads when the number of concurrent queries goes over 50% of the rejection threshold for that referrer (e.g. subscriptions_executor rejects at 200 concurrent queries, we throttle at 100 queries)