Skip to content
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

ngx_http_limit_req_module: add "r/h" (request per hour), "r/d" (request per day) support #183

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FJEagle
Copy link

@FJEagle FJEagle commented Sep 14, 2024

ngx_http_limit_req_module: add "r/h"(request per hour), "r/d"(request per day) support

by two steps:
1、replace the scale multiplier(1000) constant with MACRO definition
2、change the scale multipiler from 1000 to 1000000 to support new "r/h", "r/d" options

replace rate/excess/burst scale multiplier 1000 constant with MACRO definition
add "r/h"(request per hour), "r/d"(request per day) support
@jo-carter
Copy link

jo-carter commented Sep 18, 2024

The leaky bucket algorithm, as limit_req uses, is (very) poorly suited to rate limiting over long intervals such as hours or a days
. I don't think this is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants