Git Product home page Git Product logo

rate-control's Introduction

rate-control's People

Contributors

corentin-regent avatar dependabot[bot] avatar

Stargazers

Nikolaus Schlemm avatar Yevhen Ts. avatar  avatar

Watchers

 avatar

rate-control's Issues

Adding a NoopController

There are situations where efficient rate controlling is an appropriate default behavior, for example when writing a library for an API wrapper. However, the user may want to override this behavior and let the requests pass through unboundedly again.

A solution for the author of the API wrapper library could be to accept None as the rate controller factory parameter, and handle the None case on every call they make to the rate controller.

This is far from ideal, so a better solution would be that we offer a NoopController (or whatever name fits best), that would match the RateController interface and do precisely nothing.

In order to optimize memory usage, such controller should be implemented as a singleton.

Chaining rate controllers

Sometimes, the ability to chain buckets does not suffice, and we would need to chain rate controllers. For example let's say that we work with multiple REST APIs at the same time, each of them using their own rate controller.

We can already chain a global bucket with each one of these buckets, using BucketGroups, for example if we would like globally to not send too many requests at once. However, if we would like to enfore global constraints, such as defining a global concurrency limit, well currently we cannot.

A solution, that has yet to be implemented, would be to share a global rate controller with no bucket but only this concurrency limit, and chain each of the individual rate controllers with it.

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.