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

Reduce abusers rate limit to 40 rps and add rate limit on versions #2634

Merged
merged 1 commit into from Feb 8, 2021

Conversation

sonalkr132
Copy link
Member

@sonalkr132 sonalkr132 commented Feb 6, 2021

We had increased limits to 100 rps when we were having issues with info endpoint. we don't rate limit info at the moment, these limit need not be this high. Further, we had 100 rps at the time when we were running single nginx. With nginx on every pod, our rate limit was 100 * number of pods (replicas).

versions was missing rate limit. added it for good measure.

I have verified that our normal traffic doesn't need this high limits.
Our original rate limits were 10 rps:
https://github.com/rubygems/rubygems-chef/blob/master/cookbooks/rubygems-balancer/templates/default/site.conf.erb#L14

We will further reduce this to 20 rps at the very least. just doing it in steps.

Fixes: CPU spikes on postgres.

We had increased limits to 100 rps when we were having issues with
info endpoint. we don't rate limit info at the moment, there limit
need not be this high. Further, we had 100 rps at the time when
we were running single nginx. With nginx on every pod, our rate limit
was 100 * number of pods (replicas).

versions was missing rate limit. added it for good measure.

I have verified that our normal traffic doesn't need this high limits.
Our original rate limits were 10 rps:
https://github.com/rubygems/rubygems-chef/blob/master/cookbooks/rubygems-balancer/templates/default/site.conf.erb#L14
@sonalkr132 sonalkr132 merged commit 4173099 into rubygems:master Feb 8, 2021
@sonalkr132 sonalkr132 deleted the nginx-rate-limit branch February 8, 2021 08:30
@sonalkr132 sonalkr132 temporarily deployed to staging February 9, 2021 15:19 Inactive
@sonalkr132 sonalkr132 temporarily deployed to production February 9, 2021 15:44 Inactive
sonalkr132 added a commit to sonalkr132/rubygems.org that referenced this pull request Apr 26, 2021
Follow up to rubygems#2634
We were using combined rate limit of 20 rps before migrating to side-car
nginx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant