This is an automated email from the ASF dual-hosted git repository.

navendu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b25be489 docs: correct rate in `limit-req` plugin example (#11550)
6b25be489 is described below

commit 6b25be489b9bccea14d7de0bb0e828c77fc0e888
Author: MrLinMH <[email protected]>
AuthorDate: Thu Sep 5 05:58:37 2024 -0400

    docs: correct rate in `limit-req` plugin example (#11550)
    
    Co-authored-by: Menghai <[email protected]>
---
 docs/en/latest/plugins/limit-req.md | 10 +++++-----
 docs/zh/latest/plugins/limit-req.md |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/docs/en/latest/plugins/limit-req.md 
b/docs/en/latest/plugins/limit-req.md
index 9c5aafbb3..f5aa3e6ec 100644
--- a/docs/en/latest/plugins/limit-req.md
+++ b/docs/en/latest/plugins/limit-req.md
@@ -77,7 +77,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 
"X-API-KEY: $admin_key" -X P
     "uri": "/index.html",
     "plugins": {
         "limit-req": {
-            "rate": 1,
+            "rate": 3,
             "burst": 2,
             "rejected_code": 503,
             "key_type": "var",
@@ -101,7 +101,7 @@ You can also configure the `key_type` to `var_combination` 
as shown:
     "uri": "/index.html",
     "plugins": {
         "limit-req": {
-            "rate": 1,
+            "rate": 3,
             "burst": 2,
             "rejected_code": 503,
             "key_type": "var_combination",
@@ -130,8 +130,8 @@ curl http://127.0.0.1:9180/apisix/admin/consumers -H 
"X-API-KEY: $admin_key" -X
             "key": "auth-jack"
         },
         "limit-req": {
-            "rate": 1,
-            "burst": 3,
+            "rate": 3,
+            "burst": 2,
             "rejected_code": 403,
             "key": "consumer_name"
         }
@@ -164,7 +164,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 
"X-API-KEY: $admin_key" -X P
 
 ## 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 7297491d6..564e38edc 100644
--- a/docs/zh/latest/plugins/limit-req.md
+++ b/docs/zh/latest/plugins/limit-req.md
@@ -81,7 +81,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 \
     "uri": "/index.html",
     "plugins": {
         "limit-req": {
-            "rate": 1,
+            "rate": 3,
             "burst": 2,
             "rejected_code": 503,
             "key_type": "var",
@@ -97,7 +97,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 \
 }'
 ```
 
-上述示例表示,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 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 \
     "uri": "/index.html",
     "plugins": {
         "limit-req": {
-            "rate": 1,
+            "rate": 3,
             "burst": 2,
             "rejected_code": 503,
             "key_type": "var_combination",

Reply via email to