You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2022/10/31 02:09:52 UTC
[apisix] branch master updated: docs: update limit count plugin doc (#8196)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan 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 ad1f12226 docs: update limit count plugin doc (#8196)
ad1f12226 is described below
commit ad1f12226ff28ab709bddd3361645bc4e75ec181
Author: levy liu <37...@qq.com>
AuthorDate: Mon Oct 31 10:09:46 2022 +0800
docs: update limit count plugin doc (#8196)
---
docs/en/latest/plugins/limit-count.md | 8 +++++++-
docs/zh/latest/plugins/limit-count.md | 12 ++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/docs/en/latest/plugins/limit-count.md b/docs/en/latest/plugins/limit-count.md
index b3be40ea7..36e95c893 100644
--- a/docs/en/latest/plugins/limit-count.md
+++ b/docs/en/latest/plugins/limit-count.md
@@ -181,7 +181,13 @@ curl -i http://127.0.0.1:9180/apisix/admin/services/1 \
}'
```
-Now every request will share the same count limitation regardless of their remote address.
+The above configuration means that when the `group` attribute of the `limit-count` plugin is configured to `services_1#1640140620` for multiple routes, requests to those routes will share the same counter, even if the requests come from different IP addresses.
+
+:::note
+
+The configuration of `limit-count` in the same `group` must be consistent. If you want to change the configuration, you need to update the value of the corresponding `group` at the same time.
+
+:::
For cluster-level traffic limiting, you can use a Redis server. The counter will be shared between different APISIX nodes to achieve traffic limiting.
diff --git a/docs/zh/latest/plugins/limit-count.md b/docs/zh/latest/plugins/limit-count.md
index 8aaa639af..ab4062b35 100644
--- a/docs/zh/latest/plugins/limit-count.md
+++ b/docs/zh/latest/plugins/limit-count.md
@@ -149,12 +149,6 @@ curl -i http://127.0.0.1:9180/apisix/admin/routes/2 \
}'
```
-:::note 注意
-
-同一个 `group` 里面的 `limit-count` 的配置必须保持一致。一旦修改了配置,你需要更新对应的 `group` 的值。
-
-:::
-
通过将 `key_type` 设置为 `"constant"`,你也可以在所有请求间共享同一个限流计数器:
```shell
@@ -182,6 +176,12 @@ curl -i http://127.0.0.1:9180/apisix/admin/services/1 \
以上配置表示:当多个路由中 `limit-count` 插件的 `group` 属性均配置为 `services_1#1640140620` 时,访问这些路由的请求将会共享同一个计数器,即使这些请求来自于不同的 IP 地址。
+:::note 注意
+
+同一个 `group` 里面的 `limit-count` 的配置必须保持一致。如果修改配置,需要同时更新对应的 `group` 的值。
+
+:::
+
如果你需要一个集群级别的流量控制,我们可以借助 Redis 服务器来完成。不同的 APISIX 节点之间将共享流量限速结果,实现集群流量限速。
以下示例展示了如何在指定路由上启用 `redis` 策略: