Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement for circuit breaking #790

Closed
bingyang001 opened this issue May 26, 2019 · 4 comments
Closed

Enhancement for circuit breaking #790

bingyang001 opened this issue May 26, 2019 · 4 comments
Labels
area/circuit-breaking Issues or PRs related to circuit breaking kind/discussion For further discussion kind/enhancement Category issues or prs related to enhancement.

Comments

@bingyang001
Copy link

bingyang001 commented May 26, 2019

1,熔断时除了抛出DegradeException异常,可否给出查询具体是什么业务异常触发了规则,比如:AException,BExcetpion,导致熔断;单从DegradeException异常看对于业务问题排查帮助不大

2,同一资源熔断规则可否配置多项,并设置优先级,比如:异常数,响应时间,异常比例,多项中谁先达到熔断条件则触发熔断,另外可否只有特定异常才加入到统计中

3,RT_MAX_EXCEED_N = 5 这个可否设置未配置项

4,限流,熔断,系统规则可否加入规则组的概念,这样使用较为方便,只需要把资源加入到规则组即可,减少配置项

5,熔断规则异常比例,count=0.7 (1秒内70%的异常)在一秒内有只有4个异常,也触发了熔断且时间基本是在23:59这是配置有误,还是系统边界值问题,版本1.6release
配置如:
"degradeRules": [
{
"count": 0.7,
"grade": 1,
"timeWindow": 30
}
]

@sentinel-bot
Copy link
Collaborator

Hi @bingyang001, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

Fuse rule

1, in addition to throwing a DegradeException exception, ** can give a query specific business exception triggered rules, such as: AException, BExcetpion**, resulting in fuse; single from the DegradeException exception to help for business troubleshooting

  1. Can the same resource fuse rule be configured with multiple parameters, and set the priority, such as: abnormal number, response time, abnormal proportion, whoever gets the fuse condition first triggers the fuse, and can only add specific exceptions to the statistics.

3, RT_MAX_EXCEED_N = 5 Can this set unconfigured items?

4, current limit, fuse, system rules can be added to the concept of the rule group, so it is more convenient to use, only need to add resources to the rule group, reduce configuration items

5, the fuse rule abnormal proportion, count = 0.7 (70% of the abnormality in 1 second) there are only 4 exceptions in one second, also triggered the fuse and the time is basically at 23:59, this is the configuration is wrong, or the system boundary Value problem
Configuration such as:
"degradeRules": [
{
"count": 30,
"grade": 2,
"timeWindow": 30
}
]

@sentinel-bot sentinel-bot changed the title 熔断规则 Fuse rule May 26, 2019
@sczyh30 sczyh30 added kind/discussion For further discussion kind/enhancement Category issues or prs related to enhancement. labels May 26, 2019
@sczyh30 sczyh30 changed the title Fuse rule Enhancement for circuit breaking May 26, 2019
@sczyh30
Copy link
Member

sczyh30 commented Jun 27, 2019

Thanks for your suggestion! For 3, the configuration will be supported in 1.7.0. See #789

For other ideas, maybe we could discuss in #606

@sczyh30 sczyh30 added the area/circuit-breaking Issues or PRs related to circuit breaking label Jul 4, 2019
@sczyh30
Copy link
Member

sczyh30 commented Dec 6, 2019

As for 1.7.0, most of these have been improved.

1,熔断时除了抛出DegradeException异常,可否给出查询具体是什么业务异常触发了规则 (get the exact cause when circuit breaking triggered),比如:AException,BExcetpion,导致熔断;单从DegradeException异常看对于业务问题排查帮助不大

For 1, we're planning to introduce a log for recorded biz exceptions. See #925 for more details.

2,同一资源熔断规则可否配置多项,并设置优先级,比如:异常数,响应时间,异常比例,多项中谁先达到熔断条件则触发熔断,另外可否只有特定异常才加入到统计中

Sentinel supports multiple degrade rules for the same resource. Each degrade rule will be checked (priority might not be needed).

Since 1.6.x, you could set the exception type set via the Tracer.setExceptionsToTrace(xxx) method.

public static void setExceptionsToTrace(Class<? extends Throwable>... traceClasses) {
checkNotNull(traceClasses);
Tracer.traceClasses = traceClasses;
}

3,RT_MAX_EXCEED_N = 5 这个可否设置为配置项 (configurable for this item)

This has been supported since 1.7.0.

4,限流,熔断,系统规则可否加入规则组 (rule group) 的概念,这样使用较为方便,只需要把资源加入到规则组即可,减少配置项

Good idea. We may open a new issue and do further discussion.

@sczyh30
Copy link
Member

sczyh30 commented Jun 30, 2021

Circuit breaking has been refactored and enhanced since 1.8.0

@sczyh30 sczyh30 closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/circuit-breaking Issues or PRs related to circuit breaking kind/discussion For further discussion kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants