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

solved #66, support default degrade rule. #2232

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

wuwen5
Copy link
Contributor

@wuwen5 wuwen5 commented Jun 10, 2021

扩展支持默认规则的实现思路, 适用已发布版本.

#66

@sczyh30 sczyh30 added kind/feature Category issues or prs related to feature request. to-review To review labels Jun 10, 2021
@sczyh30 sczyh30 requested review from cdfive and sczyh30 June 10, 2021 01:50
@sczyh30 sczyh30 added area/circuit-breaking Issues or PRs related to circuit breaking and removed area/circuit-breaking Issues or PRs related to circuit breaking labels Jun 30, 2021
@CLAassistant
Copy link

CLAassistant commented Jan 26, 2022

CLA assistant check
All committers have signed the CLA.

@XW512
Copy link

XW512 commented Sep 16, 2022

这个能告知下,怎么配置吗?我把你这些类都按照包名覆盖了,还是无法生效

@wuwen5
Copy link
Contributor Author

wuwen5 commented Sep 16, 2022

这个能告知下,怎么配置吗?我把你这些类都按照包名覆盖了,还是无法生效

例如这样

[
  {
    "resource": "*",
    "count": 5000,
    "grade": 0,
    "minRequestAmount": 10,
    "slowRatioThreshold": 0.7,
    "statIntervalMs": 20000,
    "timeWindow": 3
  },
  {
    "resource": "*",
    "count": 0.8,
    "grade": 1,
    "minRequestAmount": 10,
    "statIntervalMs": 20000,
    "timeWindow": 3
  }
]

@XW512
Copy link

XW512 commented Sep 16, 2022

这个能告知下,怎么配置吗?我把你这些类都按照包名覆盖了,还是无法生效

例如这样

[
  {
    "resource": "*",
    "count": 5000,
    "grade": 0,
    "minRequestAmount": 10,
    "slowRatioThreshold": 0.7,
    "statIntervalMs": 20000,
    "timeWindow": 3
  },
  {
    "resource": "*",
    "count": 0.8,
    "grade": 1,
    "minRequestAmount": 10,
    "statIntervalMs": 20000,
    "timeWindow": 3
  }
]

感谢回复,我试了这种方式,发现不生效,我debug了下新写的DefaultDegradeRuleManager和DefaultDegradeSlot,发现没进入这两个类,我在自己的jar中添加同样包名的类和在resources下添加文件名为com.alibaba.csp.sentinel.slotchain.ProcessorSlot,里面的内容是:com.alibaba.csp.sentinel.slots.block.degrade.DefaultDegradeSlot
是不是这样的方式,我使用的不对,所以不加载,求指导

@sczyh30 sczyh30 added the area/circuit-breaking Issues or PRs related to circuit breaking label Nov 8, 2022
Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sczyh30 sczyh30 merged commit 061371b into alibaba:master Nov 8, 2022
@sczyh30
Copy link
Member

sczyh30 commented Nov 8, 2022

Nice work. Thanks for contributing! I'll refine the mechanism later.

@sczyh30
Copy link
Member

sczyh30 commented Nov 8, 2022

Universal default circuit breaker rules will be supported in Sentinel 2.0.0. Cheers!

@xieJingHua
Copy link

xieJingHua commented Nov 29, 2022

想问下这个是在sentinel-core 2.0.0发布吗,2.0.0已经发布了吗?目前发现maven上最新版本还是1.8.6, 这个特性4年了还没上吗?

@GotchaTOP
Copy link

使用了sentinel 2.0.0,并且maven依赖包换成了sentinel-core 2.0.0 界面上看到了 sentinel_default_context 但是为啥配置了不生效呢
image

@sczyh30
Copy link
Member

sczyh30 commented Mar 21, 2023

使用了sentinel 2.0.0,并且maven依赖包换成了sentinel-core 2.0.0 界面上看到了 sentinel_default_context 但是为啥配置了不生效呢 image

默认熔断规则目前暂不支持控制台配置,可以通过 DefaultCircuitBreakerRuleManager 注册数据源或 loadRules 手动配置。

@GotchaTOP
Copy link

您好,在使用默认断流器时,发现如果有3个接口,其中1个接口由于超时等问题被熔断,剩下的2个接口也处于被熔断状态。请问这是正常的逻辑吗(因为我的预期是,默认断流器就像普通断流规则一样,只会断流那个出现问题的接口/资源)

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/feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants