Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Limit to under 1 request per second? #18

Open
nathanpalmer opened this issue Jul 4, 2017 · 3 comments
Open

Limit to under 1 request per second? #18

nathanpalmer opened this issue Jul 4, 2017 · 3 comments

Comments

@nathanpalmer
Copy link
Contributor

We're looking for a solution to limit requests to an external API to slow down our requests (from multiple backend services) to conform with their rate limits. They have set a 30 request per minute limit which is going to be roughly ½ requests per second.

This doesn't seem to fit in with cuttle's configuration as anything under 0 is throwing an exception. I would essentially need to set a rate: .5 in the configuration I believe.

@mrkschan
Copy link
Owner

mrkschan commented Jul 4, 2017

If your API service support busting up to 30 requests per 60s, it make senses to add a new request-per-minutes rate limit control :) @nathanpalmer

@ivarec
Copy link

ivarec commented Jul 12, 2018

But the "rpm" solution means that I can burst 30 requests in 1 second, and then spend the other 59 seconds of the current minute waiting.

What if I really want to limit my requests to one request per 2 seconds? The decimal solution seems necessary as well.

@fship7
Copy link

fship7 commented Nov 3, 2019

I made a pull request for a fork that addresses this issue:

#21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants