docs(limit-conn): re-port with Admin API, ADC, and Ingress Controller tabs#13215
docs(limit-conn): re-port with Admin API, ADC, and Ingress Controller tabs#13215Yilialinn wants to merge 5 commits intoapache:masterfrom
Conversation
kayx23
left a comment
There was a problem hiding this comment.
I found a few remaining doc mismatches in this PR:
-
default_conn_delayis still described incorrectly in the attribute table in both EN and ZH docs. It currently says it applies to concurrent requests exceedingconn + burst, but the implementation rejects requests atconn + burstand only delays requests afterconnis exceeded. -
burstandrules.burstare still described as applying "per second". That wording is misleading forlimit-conn, since this plugin limits concurrent requests rather than a time-windowed request rate. -
The Redis cluster docs are still internally inconsistent: the attribute table now says
redis_cluster_nodesneeds at least one address, but the Redis cluster example prose still says a minimum of two nodes is required for the plugin configuration.
Implementation references:
apisix/plugins/limit-conn/util.luaapisix/utils/redis-schema.lua
There was a problem hiding this comment.
Pull request overview
This PR refreshes the limit-conn plugin documentation (EN + ZH) by re-porting content from API7 docs and adding multi-surface configuration examples (Admin API, ADC, Ingress Controller), plus updated attribute details and a new rules-based limiting section.
Changes:
- Added Docusaurus tabbed examples for Admin API / ADC / Ingress Controller across all example sections.
- Updated the attribute tables to reflect current schema constraints (e.g.,
redis_cluster_nodesminItems,key_ttl,rules.*types). - Added a “Rate Limit by Rules” section (APISIX ≥ 3.16.0) with sequential rule behavior examples.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/en/latest/plugins/limit-conn.md | Re-ported and expanded EN docs with tabbed examples, updated attributes, and “Rate Limit by Rules” section. |
| docs/zh/latest/plugins/limit-conn.md | Same as EN in Chinese, including updated attribute table and tabbed examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| | redis_cluster_ssl | boolean | False | false | | If true, use SSL to connect to Redis cluster when `policy` is `redis-cluster`. | | ||
| | redis_cluster_ssl_verify | boolean | False | false | | If true, verify the server SSL certificate when `policy` is `redis-cluster`. | | ||
| | rules | array[object] | False | | | An array of rate-limiting rules that are applied sequentially. Available in APISIX from 3.16.0. You should configure one of the following parameter sets, but not both: `conn`, `burst`, `default_conn_delay`, `key` or `rules`, `default_conn_delay`. | | ||
| | rules.conn | integer or string | True | | > 0 or variable expression | The maximum number of concurrent requests allowed. Requests exceeding the configured limit and below `conn + burst` will be delayed. This parameter also supports the string data type and allows the use of built-in variables prefixed with a dollar sign (`$`). | |
There was a problem hiding this comment.
variable expression
Should use lua-resty-expr consistently and link it to https://github.com/api7/lua-resty-expr
Summary
Re-port the
limit-connplugin documentation from API7 docs with all three configuration tabs:Changes from existing doc
redis_cluster_nodes: corrected from "at least two addresses" to "at least one address" (source:minItems = 1)key_ttlattribute (integer, default 3600, for redis/redis-cluster)rules.connandrules.burst: documented asinteger or string(supports variable expressions)