Code Monkey home page Code Monkey logo

Comments (5)

t3chnoboy avatar t3chnoboy commented on June 15, 2024

Hey @FdezRomero!
It think it is a good idea to add an option to limit requests.
https://github.com/jhurliman/node-rate-limiter comes to mind. Any advantages of using bottleneck over it?
Can you show an example of that option in other languages?

from amazon-product-api.

FdezRomero avatar FdezRomero commented on June 15, 2024

Hi @t3chnoboy,

I chose Bottleneck over node-rate-limiter because it allows to create a different keys/queues for each API endpoint and seemed very lightweight and performant (the creators use it for production DNS). However, I'm not sure if some endpoints are counted together for the rate limiting or not, I found contradictory information about this. Anyway, I have no preference in using these libraries or a custom implementation as long as it supports concurrency.

You can find an example of the MaxQPS I mentioned before in bottlenose, a client written in Python (I haven't used it myself).

Thanks!

from amazon-product-api.

kaijuliu avatar kaijuliu commented on June 15, 2024

Hi @FdezRomero. I recently ran into the same throttling issue and found that global throttling, i.e. not per-endpoint throttling, was the solution. Putting https://github.com/jhurliman/node-rate-limiter, as @t3chnoboy suggested, in front of all requests worked well.

from amazon-product-api.

FdezRomero avatar FdezRomero commented on June 15, 2024

Thanks @kaijuliu, knowing that the limit is actually global and not per endpoint really helps 👍
I read some time ago a comment saying that the European stores acted like a cluster and the rest were independent, but I never found official information from Amazon...

from amazon-product-api.

masterT avatar masterT commented on June 15, 2024

@t3chnoboy can we close this issue?

from amazon-product-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.