Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

DegradeRule cannot degrade resources corresponding to response time longer than 1s

Open kangyl opened this issue 7 years ago • 2 comments

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

DegradeRule 对应响应时间超过1s的资源无法降级,我某个接口平均响应时间2s左右,我想针对该接口做熔断限制,看了下代码发现avgRt的数据来源为StatisticNode.rollingCounterInSecond.该属性的统计时间窗口为1s而已,如果资源请求超过1s永远不会触发熔断降级的情况

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

kangyl avatar Jun 21 '19 06:06 kangyl

Hi @kangyl, 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.

DegradeRule cannot degrade resources corresponding to response time longer than 1s

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

DegradeRule corresponds to a resource with a response time of more than 1s. The average response time of an interface is about 2s. I want to make a fuse limit for this interface. I found the data source of avgRt as StatisticNode.rollingCounterInSecond. The statistical time window of this attribute. For 1s, if the resource request exceeds 1s, it will never trigger the blowdown.

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

sentinel-bot avatar Jun 21 '19 06:06 sentinel-bot

Hi, have you tried it out?

Basically the request is calculated into the window when finished and the rt can be greater than 1 second.

jasonjoo2010 avatar Jun 21 '19 06:06 jasonjoo2010