Skip to content

fix(limit-req): use parent resource key for consumer isolation#13019

Draft
janiussyafiq wants to merge 3 commits intoapache:masterfrom
janiussyafiq:feat/add-group-param-limit-req-conn
Draft

fix(limit-req): use parent resource key for consumer isolation#13019
janiussyafiq wants to merge 3 commits intoapache:masterfrom
janiussyafiq:feat/add-group-param-limit-req-conn

Conversation

@janiussyafiq
Copy link
Contributor

@janiussyafiq janiussyafiq commented Feb 18, 2026

Description

Previously, when limit-req was configured at the consumer level, rate limits were applied per route instead of globally per consumer. This occurred because the key generation concatenated ctx.conf_type and ctx.conf_version, which included route-specific information. Now consumer-level rate limits are properly shared across all routes accessed by the same consumer by using the conf._meta.parent approach.

Changes:

  • Used conf._meta.parent.resource_key for key generation
  • Added consumer isolation test

Which issue(s) this PR fixes:

Fixes #12946

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@janiussyafiq janiussyafiq force-pushed the feat/add-group-param-limit-req-conn branch from f548452 to ea10d8d Compare February 20, 2026 06:50
@janiussyafiq janiussyafiq marked this pull request as ready for review February 20, 2026 06:58
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Feb 20, 2026
@janiussyafiq janiussyafiq marked this pull request as draft February 20, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: limit-req: conf_type/conf_version suffix makes per-consumer rate limits effectively per-route

1 participant

Comments