Skip to content
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

Increase rateLimitingUserReqLimit to 60000 reqs / hr / IP to prevent Snapback causing nodes to rate limit each other #1664

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

SidSethi
Copy link
Contributor

@SidSethi SidSethi commented Jul 19, 2021

Description

What is the purpose of this PR? What is the current behavior? New behavior? Relevant links (e.g. Trello) and/or information pertaining to PR?

New Snapback programmatic consumption of /users/clock_status/* route leads to hitting the global /users/* routes rate limit very quickly, causing snapback to short-circuit incorrectly and make our logs useless.

Prod and staging do not override this config anywhere, so they will automatically use the value I've defined here in default-config.json

Tests

Tested locally, confirmed rate limit is correctly applied to /users/clock_status/* route

❗ Reminder 💡❗:
If this PR touches a critical flow (such as Indexing, Uploads, Gateway or the Filesystem), make sure to add the requires-special-attention label. Add relevant labels as necessary.

How will this change be monitored?

We should not see a significant number of 429s in CN Snapback logs

@SidSethi SidSethi added the content-node Content Node (previously known as Creator Node) label Jul 19, 2021
@SidSethi SidSethi requested a review from dmanjunath July 19, 2021 20:41
Copy link
Contributor

@dmanjunath dmanjunath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These limits double dip with the global rateLimitingUserReqLimit limit. That's set to 3000 by default so if we don't bump that as well, once we hit 3000 there this will fail

@SidSethi SidSethi assigned vicky-g and unassigned raymondjacobson Jul 19, 2021
@SidSethi SidSethi requested a review from dmanjunath July 19, 2021 21:07
@SidSethi SidSethi changed the title Set GET /users/clock_status/* route rate limits to 1000 reqs/min Set rateLimitingUserReqLimit to 60000 reqs / hr / IP Jul 19, 2021
@SidSethi SidSethi changed the title Set rateLimitingUserReqLimit to 60000 reqs / hr / IP Increase rateLimitingUserReqLimit to 60000 reqs / hr / IP to prevent Snapback causing nodes to rate limit each other Jul 19, 2021
@SidSethi SidSethi merged commit cc4200e into master Jul 19, 2021
@SidSethi SidSethi deleted the ss-increase-clock-status-route-rate-limits branch July 19, 2021 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content-node Content Node (previously known as Creator Node)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants