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

Throttling Requests #716

Closed
reggi opened this issue Nov 27, 2013 · 4 comments
Closed

Throttling Requests #716

reggi opened this issue Nov 27, 2013 · 4 comments

Comments

@reggi
Copy link

reggi commented Nov 27, 2013

One of the API's I use most frequently (the Shopify API). Recently put out a new call limit, I'm seeing errors like:

Exceeded 6.0 calls per second for api client. Slow your requests or contact support for higher limits.

I've already gotten an upgrade, but regardless of how much bandwidth I get I have to account for this. A large majority of the requests to the Shopify API are within async.map() functions, which loop asynchronous requests, and gather the bodies.

I'm looking for any help, perhaps a library that already exists, that would wrap around the request module and actually block, sleep, throttle, allocate, manage, the many simultaneous requests that are firing off asynchronously and limit them to say 6 requests at a time. I have no problem with working on such a project if it doesn't exist. I just don't know how to handle this kind of situation, and I'm hoping for some kind of standard.

@mikeal
Copy link
Member

mikeal commented Nov 27, 2013

Is your entire app in one node.js process or is it balanced across a few?

@reggi
Copy link
Author

reggi commented Nov 27, 2013

@mikeal Just one.

@mikeal
Copy link
Member

mikeal commented Nov 27, 2013

@mmalecki
Copy link
Member

Closing this - not a request bug.

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

No branches or pull requests

3 participants