image-minify-api icon indicating copy to clipboard operation
image-minify-api copied to clipboard

Feature: Implement Quota

Open ingowalther opened this issue 8 years ago • 7 comments

Implement Quota per User.

ingowalther avatar Oct 10 '16 10:10 ingowalther

Hello, i'll take it.

denis-n-ko avatar Oct 10 '16 16:10 denis-n-ko

@denis-n-ko thank you!

ingowalther avatar Oct 10 '16 17:10 ingowalther

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.

denis-n-ko avatar Oct 11 '16 10:10 denis-n-ko

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 avatar Oct 11 '16 11:10 ingowalther

This issue is still open.

ingowalther avatar Nov 22 '16 10:11 ingowalther

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

luchianenco avatar Jan 03 '17 22:01 luchianenco

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

luchianenco avatar Jan 05 '17 04:01 luchianenco