feat: add redis and redis-cluster in limit-req#10874
Merged
shreemaan-abhishek merged 26 commits intoFeb 22, 2024
Merged
Conversation
theweakgod
force-pushed
the
feat/add_redis_in_limit_req
branch
from
January 29, 2024 07:01
620c52d to
a56f254
Compare
Contributor
|
I would suggest working on this only after redis support for |
Contributor
Author
Yeah, I think so. |
shreemaan-abhishek
marked this pull request as draft
January 31, 2024 04:59
Contributor
|
@theweakgod we may start working on this now. Please make changes carefully and diligently considering the code review we did for |
Contributor
Author
ok |
theweakgod
marked this pull request as ready for review
February 8, 2024 06:13
Contributor
Author
|
@shreemaan-abhishek @monkeyDluffy6017 I'm ready for the review. |
| elseif conf.policy == "redis" then | ||
|
|
||
| core.log.info("create new limit-req redis plugin instance") | ||
|
|
juststillthinking
previously approved these changes
Feb 20, 2024
juststillthinking
previously approved these changes
Feb 20, 2024
shreemaan-abhishek
requested changes
Feb 22, 2024
| | allow_degradation | boolean | False | false | | When set to `true` enables Plugin degradation when the Plugin is temporarily unavailable and allows requests to continue. | | ||
| | Name | Type | Required | Default | Valid values | Description | | ||
| |--------------------------|---------| -------- |-------------|-----------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | conn | integer | True | | conn > 0 | Maximum number of concurrent requests allowed. Requests exceeding this ratio (and below `conn` + `burst`) will be delayed (configured by `default_conn_delay`). | |
| | Name | Type | Required | Default | Valid values | Description | | ||
| |--------------------------|---------| -------- |-------------|-----------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | conn | integer | True | | conn > 0 | Maximum number of concurrent requests allowed. Requests exceeding this ratio (and below `conn` + `burst`) will be delayed (configured by `default_conn_delay`). | | ||
| | burst | integer | True | | burst >= 0 | Number of additional concurrent requests allowed to be delayed per second. If the number exceeds this hard limit, they will get rejected immediately. | |
Contributor
There was a problem hiding this comment.
please check the docs, it has unrelated changes
juststillthinking
approved these changes
Feb 22, 2024
shreemaan-abhishek
approved these changes
Feb 22, 2024
shreemaan-abhishek
added a commit
that referenced
this pull request
Feb 23, 2024
This reverts commit 1439b13.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #10501 (#10501)
Add options for redis and redis-cluster in the limit-req plugin, and use redis as the counter.
Checklist