-
Notifications
You must be signed in to change notification settings - Fork 630
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
feat: cluster key rate limit enhancement #1036
Merged
Merged
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0f828be
feat: cluster rate limit by client ip
hanxiantao 6c07b58
feat: cluster key rate limit
hanxiantao 55b5c04
Merge branch 'alibaba:main' into key-cluster-rate-limit
hanxiantao d91c337
Merge branch 'main' into key-cluster-rate-limit
hanxiantao a335fc6
simplify the redis configuration method
hanxiantao 484ad2d
Merge branch 'alibaba:main' into key-cluster-rate-limit
hanxiantao 8ae7a1f
cluster key rate limit enhancement
hanxiantao 92670ca
Update README.md
johnlanni 66da298
cluster key rate limit enhancement
hanxiantao fa0a76d
Update README.md
hanxiantao cd8843a
fix limit_by_per_consumer
hanxiantao f1e785d
Update README.md
johnlanni a485bf6
support batch configuration of rate limiting rules
hanxiantao 0df978a
Update README.md
hanxiantao 75a2263
Update README.md
hanxiantao 78e73f8
adjust the rules for construct redis keys
hanxiantao 7a9d6e3
modify the comment
hanxiantao e9d2c29
Update README.md
johnlanni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里会有歧义,是匹配到的所有统一限制1000,还是匹配到的每一个分别限制1000。
所以我建议增加新的配置项: limit_by_per_header, limit_by_per_param
用来表示匹配到的每一个分别限制这一含义。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,那应该就是limit_by_header和limit_by_param只支持精确匹配的,limit_by_per_header和limit_by_per_param只支持正则匹配和*的方式
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已调整,目前支持以下几种方式:
limit_by_header、limit_by_param、limit_by_consumer、limit_by_cookie(匹配cookie中的key=value) 支持精准匹配
limit_by_per_ip 支持按照ip和ip段配置
limit_by_peer_header、limit_by_peer_param、limit_by_peer_consumer、limit_by_per_cookie 支持正则匹配和*