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

Feature/20220518 param degrade #2723

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

furaul
Copy link

@furaul furaul commented May 18, 2022

Describe what this PR does / why we need it

This PR provides an implement of parameter degrade.

Does this pull request fix one issue?

Fixes #2412

Describe how you did it

For one resource, we have different outers to call, and the method has params the classify the outers.
For example,
we have one method

public void callOut(String outer)

The values of outer may be A, B and others.
So we got the param degrade rule like this,

{ "resource":"paramDegrade", "count":1, "paramFlowItemList":[ { "object":"A", "count":999, "classType":"java.util.String" }, { "object":"B", "count":1888, "classType":"java.util.String" } ] }

The requests with param A got an A CircuirBreaker.
The requests with param B got an B CircuirBreaker.
The requests with param!=(A or B) got an other CircuirBreaker.
If the outer service A failed, the requests with param A will be degraded, but the other requests will call normally.

Describe how to verify it

Use the module sentinel-demo-parameter-degrade to verify.

Special notes for reviews

Nothing.

@sczyh30 sczyh30 added to-review To review kind/feature Category issues or prs related to feature request. size/XXL Indicate a PR that changes 1000+ lines. labels May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Category issues or prs related to feature request. size/XXL Indicate a PR that changes 1000+ lines. to-review To review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[熔断]参数/下游方熔断需求 | Circuit breaking by slow params
2 participants