Giter Site home page Giter Site logo

Rate Limiter issues about riot-watcher HOT 1 OPEN

pseudonym117 avatar pseudonym117 commented on September 15, 2024
Rate Limiter issues

from riot-watcher.

Comments (1)

pseudonym117 avatar pseudonym117 commented on September 15, 2024

one limitation of the current rate limiter that i know of is that pending requests are not checked before a request is made. if 25 requests are made at the same time with a limit of 20 request, 5 should currently get a 429.

That comment is specifically talking about when the rate limit resets. Assume you have the limit of 10 calls/min. If you make a 2 requests right as the rate limit is about to reset, request A and request B. Response A is sent back with the header saying 10 requests have been made (so the next call will be limited). Response B is sent back with a header saying that 1 request has been made (the rate limit has reset). If response B is processed before response A, then what will happen is that the count will be set to 1, and then set to 10, leading all subsequent calls to be rate limited for a minute.

I believe that 2nd case is not a very likely case, but i believe it is possible, which is why that comment exists.

regarding the issue writing to the tuple, that seems like a pretty clear bug and should be easy to solve.

Can you split this into 2 separate issues? one for the clear bug writing things that are not writable, and one for the fact that pending requests are not tracked?

from riot-watcher.

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.