okaybase commented on a change in pull request #4808:
URL: https://github.com/apache/apisix/pull/4808#discussion_r687403585
##########
File path: docs/en/latest/plugins/limit-req.md
##########
@@ -42,6 +42,7 @@ limit request rate using the "leaky bucket" method.
| burst | integer | required | | burst >= 0
| the number of excessive
requests per second allowed to be delayed. Requests exceeding this hard limit
will get rejected immediately. |
| key | string | required | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for", "consumer_name"] | the
user specified key to limit the rate, now accept those as key:
"remote_addr"(client's IP), "server_addr"(server's IP),
"X-Forwarded-For/X-Real-IP" in request header, "consumer_name"(consumer's
username). |
| rejected_code | integer | optional | 503 | [200,...,599]
| The HTTP status code returned
when the request exceeds the threshold is rejected.
|
+| rejected_msg | string | optional |
| non-empty | The `error_msg` returned
when the request exceeds the threshold is rejected.
|
Review comment:
okay
##########
File path: docs/zh/latest/plugins/limit-conn.md
##########
@@ -33,6 +33,7 @@ title: limit-conn
| only_use_default_delay | boolean | optional | false | [true,false]
|
延迟时间的严格模式。 如果设置为`true`的话,将会严格按照设置的时间来进行延迟
|
| key | object | required | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for", "consumer_name"] |
用户指定的限制并发级别的关键字,可以是客户端 IP 或服务端 IP。<br />例如,可以使用主机名(或服务器区域)作为关键字,以便限制每个主机名的并发性。
否则,我们也可以使用客户端地址作为关键字,这样我们就可以避免单个客户端用太多的并行连接或请求淹没我们的服务。 <br />当前接受的 key
有:"remote_addr"(客户端 IP 地址), "server_addr"(服务端 IP 地址), 请求头中的"X-Forwarded-For" 或
"X-Real-IP", "consumer_name"(consumer 的 username)。 |
| rejected_code | string | optional | 503 | [200,...,599]
| 当请求超过 `conn`
+ `burst` 这个阈值时,返回的 HTTP 状态码
|
+| rejected_msg | string | 可选 |
| 非空 | 当请求超过 `conn` + `burst`
这个阈值时,返回的 `error_msg` 值。
|
Review comment:
okay
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]