Firstsawyou commented on a change in pull request #2421:
URL: https://github.com/apache/apisix/pull/2421#discussion_r506123488
##########
File path: doc/plugins/limit-count.md
##########
@@ -37,7 +37,7 @@ Limit request rate by a fixed number of requests in a given
time window.
| -------------- | ------- | -------------------- | ------- |
------------------------------------------------------------------------ |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| count | integer | required | | [0,...]
| the specified number
of requests threshold.
|
| time_window | integer | required | | [0,...]
| the time window in
seconds before the request count is reset.
|
-| key | string | required | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for"] | the user specified
key to limit the rate.
|
+| key | string | required | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for", "consumer_name"] | to
limit the number of requests. <br>For example, one can use the host name (or
server zone) as the key so that we limit the number of requests per host name.
Otherwise, we can also use the client address as a key, so that we can avoid a
single client connecting to our service too many times. <br> 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).
|
Review comment:
I think the description of `”one can use the host name (or server zone)
as the key so that we limit the number of requests per host name.“` is
unreasonable. Because in the `key` we support, except `consumer_name`, the ip
address is obtained in other cases
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]