-
Notifications
You must be signed in to change notification settings - Fork 484
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
initial simple rate limiting #224
base: main
Are you sure you want to change the base?
initial simple rate limiting #224
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
=======================================
Coverage 89.16% 89.16%
=======================================
Files 6 6
Lines 674 674
=======================================
Hits 601 601
Misses 50 50
Partials 23 23 Continue to review full report at Codecov.
|
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Hey @BrianGreenhill, I'm finally catching up on outstanding PRs 😕 I'm curious what you think of the alternate approach in #235. Rather than wrapping the handler and limiting all requests like tollbooth does, I'd kind of like to be more surgical and limit just the requests that are likely to consume resources... namely, those that require transformations. If a response is already cached, there's probably not a need to limit it. (Though I guess the counter argument there is that if it's cached, then it's probably going to return very quickly, and won't block other requests for very long. hmm....) |
@willnorris if we can be more specific and limit requests that we know will consume more resources then I think that's the better solution. I wonder if a global rate limiting flag as an upper bound for limiting rps may also be desirable for some users? However, this concern can also be handled in other ways and doesn't necessarily have to be the responsibility of the application. Thanks for responding and please go ahead with the alternative approach here 👍 |
Description
this is a very simple implementation of rate limiting for the imageproxy service.
Motivation
addresses #200