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

Add throttling options #32

Open
ErvalhouS opened this issue Nov 22, 2018 · 0 comments
Open

Add throttling options #32

ErvalhouS opened this issue Nov 22, 2018 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@ErvalhouS
Copy link
Contributor

ErvalhouS commented Nov 22, 2018

Suggestion is to adopt a Rack Attack configuration that allows to control request limiting per Apicasso::Key.

This project was designed to have this feature implemented based on JSON rule present on the .request_limit field on all Apicasso::Key object. The suggested format is:

{
  limit: # AN ALL AROUND REQUEST LIMITING,
  period: # AN ALL AROUND PERIOD FOR REQUEST THROTTLING,
  <% paths.each do |path| %>
    <%= path %>: {
      limit: # A REQUEST LIMITING FOR A SPECIFIC PATH,
      period: # A PERIOD FOR REQUEST THROTTLING FOR A SPECIFIC PATH
    }
  <% end %>
}

Please note this code example is just for the sake of explanation. This would make APIcasso have global and per-path request limiting, all based on which key is being used for the request. A feature like this would enable for API monetizing based on request quota selling

@ErvalhouS ErvalhouS added this to the v0.8.0 milestone Nov 22, 2018
@ErvalhouS ErvalhouS added the enhancement New feature or request label Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant