-
Notifications
You must be signed in to change notification settings - Fork 1k
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 rate limit functionality #286
Comments
No, that is not (yet) supported. You can run the script behind Kong. See: https://getkong.org/ |
Is there something for shared hosting? |
@rzeszow do you have memcache available? You need some store and should preferably not be the database or disk (for performance reasons). |
Yes i have. |
You can do something like described here: https://www.leaseweb.com/labs/2015/06/limit-concurrent-php-requests-using-memcache/ |
Thanks |
Some Design ideas:
Rate limits should allow filtering of concurrent requests per ip address. Rate limits should allow a bucket per "concurrent", "minute", "hour" and/or "day" |
Rate limit scopes should be "per authenticated session" (a specific session key), or "per ip address" Rate limits may have different buckets for different endpoints. Rate limits may set 'X-Rate-Limit' headers, see: https://tools.ietf.org/id/draft-polli-ratelimit-headers-00.html#rfc.section.3.1 |
We could count query/server time and limit the quota to x milliseconds execution time per hour, to make the quota fairer. |
rate limiter should error with: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 maybe a 'Retry-After' header (seems similar to X-Rate-Limit-Reset) |
Hi,
Can I use rate limit with php-crud-api?
And how can I create this rate limit.
The text was updated successfully, but these errors were encountered: