autoforce / autoforce/APIcasso
Add throttling options
- Vorherrschende Sprache
- Ruby
- Sterne
- 31
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, Apicasso::Key und den Einstiegspunkt für die Request-Verarbeitung zu finden, und überprüfe anschließend, wie Rack Attack die Konfiguration .request_limit verwenden könnte. Als erledigt gilt die Aufgabe, wenn Requests global und pro Pfad entsprechend den Limits und Zeiträumen des Keys begrenzt werden und die vorgeschlagene Konfiguration konsistent dargestellt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rails, ruby
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100