Coder Social home page Coder Social logo

g-andrade / aequitas Goto Github PK

View Code? Open in Web Editor NEW
49.0 7.0 2.0 200 KB

Fairness regulator and rate limiter

Home Page: https://hexdocs.pm/aequitas/

License: MIT License

Makefile 1.56% Erlang 98.12% Shell 0.19% Vim Script 0.13%
fairness rate-limiting outlier-detection

aequitas's People

Contributors

g-andrade avatar paulo-ferraz-oliveira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aequitas's Issues

Blocking behaviour

First of all, congrats on the library, finally a library which address fairness ;)

I have reviewed the documentation and I miss a very helpful -and needed in my specific case- feature: being able to perform a blocking ask.

If I'm not wrong, if there is no quota left, the ask function inmediately returns an error with the root cause.
Instead of returning and error, I propose an additional option to the ask function to block until there is another available slot for the requester.
In another rate limiting libraries, an additional setting allows to set a limit on how many simultaneous blocked requests can be waiting, and default to deny requests if that limit is reached and a new request is made.

At the end this behaviour is equivalent to allow reserving slots in advance.

static config format incompatible with OTP

The following format is incompatible. Key must be an atom; see application_controller:check_para/2 for details.

{aequitas,
  [{{category, http_requests},
    [{max_window_duration, {seconds,10}} % Override default 5s to 10s
    ]},

   {{category, rare_ftp_requests},
    [{max_window_size, 100} % Only track up to the last 100 acceptances
    ]}
  ]}

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.