autoforce / autoforce/APIcasso

Add throttling options

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
31
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Suggestion is to adopt a [Rack Attack](https://github.com/kickstarter/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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating Apicasso::Key and the request-handling entry point, then review how Rack Attack could consume the .request_limit configuration. Done means requests are limited globally and per path according to the key's limits and periods, with the proposed configuration represented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.