Skip to content

docs: add ADC and Ingress Controller tabs to limit-req plugin docs#13216

Open
Yilialinn wants to merge 1 commit intoapache:masterfrom
Yilialinn:docs/update-limit-req
Open

docs: add ADC and Ingress Controller tabs to limit-req plugin docs#13216
Yilialinn wants to merge 1 commit intoapache:masterfrom
Yilialinn:docs/update-limit-req

Conversation

@Yilialinn
Copy link
Copy Markdown
Contributor

@Yilialinn Yilialinn commented Apr 14, 2026

Description

Port limit-req plugin documentation with all three configuration tabs (Admin API, ADC, Ingress Controller) for all example sections.

Changes

  • Add ADC and Ingress Controller (Gateway API + APISIX CRD) tabs to all example sections
  • Add "Local vs Redis Rate Limiting" section explaining the two modes
  • Fix rate and burst attribute types from integer to number to match source code
  • Fix key attribute to be required with no default (was incorrectly showing remote_addr as default)
  • Fix redis_cluster_nodes description from "at least two addresses" to "at least one address"
  • Fix ZH doc: correct bust typo to burst, remove duplicate allow_degradation row, remove non-existent show_limit_quota_header attribute, fix redis_cluster_name table formatting

Port limit-req plugin documentation from API7 docs with all three tabs
(Admin API, ADC, Ingress Controller) for all example sections. Apply
audit fixes: rate/burst type to number, key as required with no default,
redis_cluster_nodes minimum to one address. Add Local vs Redis Rate
Limiting section. Fix ZH doc typos and remove non-existent attributes.
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. doc Documentation things labels Apr 14, 2026
@Yilialinn Yilialinn requested a review from Copilot April 16, 2026 01:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the limit-req plugin documentation to provide consistent, multi-environment configuration examples (Admin API / ADC / Ingress Controller) and to align documented attributes with the actual plugin schema.

Changes:

  • Add ADC and Ingress Controller (Gateway API + APISIX CRD) tabs to all example sections.
  • Add a “Local vs Redis Rate Limiting” section describing the two enforcement modes.
  • Correct attribute documentation to match source code (e.g., rate/burst types, required key, Redis cluster node requirements).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/zh/latest/plugins/limit-req.md Adds multi-tab examples, adds local-vs-Redis explanation, and corrects the ZH attribute table and typos.
docs/en/latest/plugins/limit-req.md Adds multi-tab examples, adds local-vs-Redis explanation, and updates the EN attribute table to match schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


❶ `rate`: limit the QPS to 1.

❷ `key`: set to `remote_addr` to apply rate limiting quota by remote address and consumer.
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the “Apply Rate Limiting by Remote Address” example, this note says the key applies quota by remote address and consumer, but the configuration only uses remote_addr and does not involve consumer identity. Please adjust the wording to avoid implying consumer-based limiting here.

Suggested change
`key`: set to `remote_addr` to apply rate limiting quota by remote address and consumer.
`key`: set to `remote_addr` to apply rate limiting quota by remote address.

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +55
| key_type | string | False | var | ["var", "var_combination"] | The type of key. If the `key_type` is `var`, the `key` is interpreted a variable. If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. |
| key | string | True | | | The key to count requests by. If the `key_type` is `var`, the `key` is interpreted a variable. The variable does not need to be prefixed by a dollar sign (`$`). If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. All variables should be prefixed by dollar signs (`$`). For example, to configure the `key` to use a combination of two request headers `custom-a` and `custom-b`, the `key` should be configured as `$http_custom_a $http_custom_b`. |
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key_type description has a grammatical error (“interpreted a variable” / “interpreted as a combination…” is missing “as”). Please update these phrases (e.g., “interpreted as a variable”) to improve clarity.

Suggested change
| key_type | string | False | var | ["var", "var_combination"] | The type of key. If the `key_type` is `var`, the `key` is interpreted a variable. If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. |
| key | string | True | | | The key to count requests by. If the `key_type` is `var`, the `key` is interpreted a variable. The variable does not need to be prefixed by a dollar sign (`$`). If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. All variables should be prefixed by dollar signs (`$`). For example, to configure the `key` to use a combination of two request headers `custom-a` and `custom-b`, the `key` should be configured as `$http_custom_a $http_custom_b`. |
| key_type | string | False | var | ["var", "var_combination"] | The type of key. If the `key_type` is `var`, the `key` is interpreted as a variable. If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. |
| key | string | True | | | The key to count requests by. If the `key_type` is `var`, the `key` is interpreted as a variable. The variable does not need to be prefixed by a dollar sign (`$`). If the `key_type` is `var_combination`, the `key` is interpreted as a combination of variables. All variables should be prefixed by dollar signs (`$`). For example, to configure the `key` to use a combination of two request headers `custom-a` and `custom-b`, the `key` should be configured as `$http_custom_a $http_custom_b`. |

Copilot uses AI. Check for mistakes.

❶ `rate`:将 QPS 限制为 1。

❷ `key`:设置为 `remote_addr`,以按远程地址和消费者应用速率限制配额。
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处说明 key 会“按远程地址和消费者”应用配额,但本示例仅使用 remote_addr,未涉及消费者信息(也未启用认证插件)。建议把表述改为仅按远程地址进行速率限制,避免误导。

Suggested change
`key`:设置为 `remote_addr`以按远程地址和消费者应用速率限制配额
`key`:设置为 `remote_addr`以按远程地址应用速率限制配额

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants