ingowalther / image-minify-api

Image Minify API
http://ingowalther.github.io/image-minify-api/
26 stars 3 forks source link

Feature: Implement Quota #5

Open ingowalther opened 8 years ago

ingowalther commented 8 years ago

Implement Quota per User.

denis-n-ko commented 8 years ago

Hello, i'll take it.

ingowalther commented 8 years ago

@denis-n-ko thank you!

denis-n-ko commented 8 years ago

Hello, btw is there any requirements for this feature? Now i am implementing it in the following way:

  1. Each apiKey will have some count of available quota.
  2. 1 quota will be burned when api is used.
  3. If apiKey will not have available quota, api request will be rejected.
ingowalther commented 8 years ago

Hello,

your plan sounds good to me. A good feature would be a quota in a range of time. e.g.: the user can make 100 api calls per day.

Greetings Ingo

ingowalther commented 7 years ago

This issue is still open.

luchianenco commented 7 years ago

what do you think to use Redis to track quota? We will reduce the processing and response time in this way

luchianenco commented 7 years ago

Started implementation - added 3 db fields for user quote per month, day and hour, updated user:add and user:list command working on, using redis as data storage for quota calculations