Free-Ma0 opened a new issue, #12152: URL: https://github.com/apache/apisix/issues/12152
### Description We deployed 3 APISIX nodes with etcd synchronization and configured the limit-conn plugin to limit WebSocket connections to 2 globally using Redis Cluster. However, each APISIX node generates different Redis keys (e.g., limit_conn:722f444a0de04e488768f38085c5798aroute&consumer246&2 and limit_conn:722f444a0de04e488768f38085c5798aroute&consumer246&11), resulting in each node allowing 2 connections instead of enforcing a global limit of 2 connections across all nodes. Key Observations: The plugin appears to create per-instance counters rather than a shared cluster-wide counter Redis Cluster configuration works for connection tracking but lacks global aggregation The generated keys contain APISIX instance-specific identifiers (e.g., route&consumer246&11 suffix) Expected Behavior: A single shared counter across all 3 APISIX nodes when using Redis Cluster policy. Question: Is there a recommended configuration pattern for global connection limits across multiple APISIX nodes? Should the key generation mechanism be modified for cluster-wide coordination? Does limit-conn officially support aggregated connection counting in Redis Cluster mode? Additional Context: From the documentation, limit-conn supports Redis Cluster policy but doesn't explicitly mention cross-node aggregation. The key combination using consumer_name remote_addr might be causing instance-specific counters. ### Environment - APISIX version (run `apisix version`): 3.11.0 - Operating system (run `uname -a`): Linux V1OIAYxNJH 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx/1.26.3 - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): {"boot_time":1744804475,"hostname":"V1OIAYxNJH","id":"9bf01b78-4a47-442c-9089-b36f24d0fcd4","version":"3.11.0","etcd_version":"3.5.0"} - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `luarocks --version`): -- 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]
