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

Make the value of RT_MAX_EXCEED_N in DegradeRule configurable #673

Closed
cdfive opened this issue Apr 16, 2019 · 2 comments · Fixed by #789
Closed

Make the value of RT_MAX_EXCEED_N in DegradeRule configurable #673

cdfive opened this issue Apr 16, 2019 · 2 comments · Fixed by #789
Labels
area/circuit-breaking Issues or PRs related to circuit breaking good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.

Comments

@cdfive
Copy link
Collaborator

cdfive commented Apr 16, 2019

Issue Description

In the process of degrade, when resource enters a quasi-degraded state, the max count (the value of RT_MAX_EXCEED_N in DegradeRule class) which statistics the next coming requests passed now is fixed value: 5.

Users in community are wondering that why the value is fixed.

Describe what happened (or what feature you want)

Users may expect that the RT_MAX_EXCEED_N can be configured in different scenes.

How about adding a property like csp.sentinel.degrade.rt.max.exceed.count?
and does it need to be modified dynamically?

Anything else we need to know?

Related to #154

@sczyh30 sczyh30 added the kind/enhancement Category issues or prs related to enhancement. label Apr 16, 2019
@sczyh30
Copy link
Member

sczyh30 commented Apr 16, 2019

I think this can be different per rules. We may need to add a new field for this, but this should be carefully designed, as this RT_MAX_EXCEED_N has multiple usages actually. In exception ratio mode, if total QPS < RT_MAX_EXCEED_N, even if the exception ratio exceeded the threshold, the request would pass.

@sczyh30
Copy link
Member

sczyh30 commented Jun 14, 2019

Resolved in #789. It's now configurable as two attributes:

  • rtSlowRequestAmount for the minimum number of consecutive slow requests that can trigger RT circuit breaking.
  • minRequestAmount for the minimum number of requests (in an active statistic time span) that can trigger circuit breaking.

@sczyh30 sczyh30 added the area/circuit-breaking Issues or PRs related to circuit breaking label Jul 4, 2019
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 good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants