diff --git a/docs/en/latest/plugins/limit-count.md b/docs/en/latest/plugins/limit-count.md index b3be40ea76d5..36e95c893af9 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 8aaa639afd80..ab4062b35a8c 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` 策略: