docs: correct rate in `limit-req` plugin example (#11550)
Co-authored-by: Menghai <linmenghai@api7.ai>
diff --git a/docs/en/latest/plugins/limit-req.md b/docs/en/latest/plugins/limit-req.md
index 9c5aafb..f5aa3e6 100644
--- a/docs/en/latest/plugins/limit-req.md
+++ b/docs/en/latest/plugins/limit-req.md
@@ -77,7 +77,7 @@
"uri": "/index.html",
"plugins": {
"limit-req": {
- "rate": 1,
+ "rate": 3,
"burst": 2,
"rejected_code": 503,
"key_type": "var",
@@ -101,7 +101,7 @@
"uri": "/index.html",
"plugins": {
"limit-req": {
- "rate": 1,
+ "rate": 3,
"burst": 2,
"rejected_code": 503,
"key_type": "var_combination",
@@ -130,8 +130,8 @@
"key": "auth-jack"
},
"limit-req": {
- "rate": 1,
- "burst": 3,
+ "rate": 3,
+ "burst": 2,
"rejected_code": 403,
"key": "consumer_name"
}
@@ -164,7 +164,7 @@
## Example usage
-Once you have configured the Plugin as shown above, you can test it out. The above configuration limits to 1 request per second. If the number of requests is greater than 1 but less than 3, a delay will be added. And if the number of requests per second exceeds 3, it will be rejected.
+Once you have configured the Plugin as shown above, you can test it out. The above configuration limits to 3 request per second. If the number of requests is greater than 3 but less than 5, a delay will be added. And if the number of requests per second exceeds 5, it will be rejected.
Now if you send a request:
diff --git a/docs/zh/latest/plugins/limit-req.md b/docs/zh/latest/plugins/limit-req.md
index 7297491..564e38e 100644
--- a/docs/zh/latest/plugins/limit-req.md
+++ b/docs/zh/latest/plugins/limit-req.md
@@ -81,7 +81,7 @@
"uri": "/index.html",
"plugins": {
"limit-req": {
- "rate": 1,
+ "rate": 3,
"burst": 2,
"rejected_code": 503,
"key_type": "var",
@@ -97,7 +97,7 @@
}'
```
-上述示例表示,APISIX 将客户端的 IP 地址作为限制请求速率的条件,当请求速率小于 3 次每秒(`rate`)时,请求正常;当请求速率大于 3 次每秒(`rate`),小于 5 次每秒(`rate + burst`)时,将会对超出部分的请求进行延迟处理;当请求速率大于 5 次每秒(`rate + burst`)时,超出规定数量的请求将返回 HTTP 状态码 `503`。
+上述示例表示,APISIX 将客户端的 IP 地址作为限制请求速率的条件,当请求速率小于等于 3 次每秒(`rate`)时,请求正常;当请求速率大于 3 次每秒(`rate`),小于等于 5 次每秒(`rate + burst`)时,将会对超出部分的请求进行延迟处理;当请求速率大于 5 次每秒(`rate + burst`)时,超出规定数量的请求将返回 HTTP 状态码 `503`。
你也可以设置 `key_type` 的值为 `var_combination`:
@@ -107,7 +107,7 @@
"uri": "/index.html",
"plugins": {
"limit-req": {
- "rate": 1,
+ "rate": 3,
"burst": 2,
"rejected_code": 503,
"key_type": "var_combination",