shreemaan-abhishek opened a new pull request, #13670: URL: https://github.com/apache/apisix/pull/13670
### Description The `ai-rate-limiting` Plugin currently keeps token counters only in per-worker shared memory (`policy = "local"`). In a multi-node deployment the counters are not shared across nodes, so the effective quota scales with the number of gateway nodes and over-allows. This PR adds a Redis-based counter policy to the Plugin, reusing the existing `limit-count` Redis backends, so counters can be centralized and a single quota is enforced across all nodes. Changes: - Export `policy_to_additional_properties` from `apisix/plugins/limit-count/init.lua` so the Plugin can reuse the shared Redis schema branches. - Add `policy` (`local` / `redis` / `redis-cluster` / `redis-sentinel`) and `allow_degradation` schema fields, plus the Redis attribute wiring in `transform_limit_conf`. - Document the new attributes and add a Redis example to `docs/en/latest/plugins/ai-rate-limiting.md`. - Add schema-validation and Redis rate-limiting test cases. The default remains `local`, so existing configurations are unaffected. #### Which issue(s) this PR fixes: Fixes # ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [x] I have added tests corresponding to this change - [x] I have updated the documentation to reflect this change - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first) -- 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]
