alibaba / alibaba/Sentinel

自定义了RequestOriginParser类,同一个资源的限流规则始终还是使用的default的规则,自定义的没有生效

Open
#2,780 1 comment 0 reactions 0 assignees View on GitHub
kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

自定义了RequestOriginParser类,同一个资源的限流规则始终还是使用的default的规则,自定义的没有生效;

假设 资源 /api/test limitApp :default qps限制 1

第二个同名的:/api/test limitApp :app1 qps限制 10

结果通过origin=app1时,还是受到了 qps=1的限制,说明limitApp生效范围没用,

求解。

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the /api/test case with the custom RequestOriginParser, comparing the default rule at QPS 1 with the app1 rule at QPS 10. Trace how the origin value selects a limitApp rule and verify that requests with origin=app1 use the app1 limit rather than the default limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.