alibaba / alibaba/Sentinel

Suggest to add a feature of customization for limitApp logic

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

Description

Currently Sentinel only supports to match simple limitApp, but sometimes users want to more advanced functions, such as if the limitApp value starts with 'alibaba', that will not be block

目前Sentinel只支持limitApp简单的匹配,用户希望更多高级的功能,例如,当limitApp的值以'alibaba'开头的话,则不实施限流熔断等,最好也支持正则表达式,例如'ali*', 'alibab?'也予以流量放行

组合限流熔断也希望能支持,例如limitApp值由动态的两个http header组合在一起,满足一定条件,则不实施限流熔断等

我尝试扩展了Sentinel,但功能相对较弱,请参考
https://github.com/Nepxion/DiscoveryGuide/blob/master/discovery-guide-service/src/main/java/com/nepxion/discovery/guide/service/impl/MyServiceSentinelRequestOriginAdapter.java

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the referenced MyServiceSentinelRequestOriginAdapter.java and compare its extension approach with Sentinel's existing limitApp matching behavior. Identify the relevant matching entry point and discuss how prefix, wildcard, regular-expression, and combined-header conditions should be specified. Done would require an agreed design and tests covering the supported customization rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.