During peak hours, a downstream service provider may run into a performance bottleneck that even affects the business. In this case, you can use the service degradation feature to degrade some service consumers. By using this feature, unimportant service consumers do not call the service. Instead, mocked responses are directly returned. Valuable resources of the downstream service provider are reserved for important service consumers. This way, the overall service stability is improved.
Create a service degradation rule
- Log on to the EDAS console.
- In the left-side navigation pane, choose .
- In the navigation tree of the Dubbo page, click Service Degradation.
- In the top navigation bar, select a region. On the Service Degradation page, select a microservice namespace. Then, click Create downgrade rules.
- In the Create downgrade rules panel, set the parameters and click OK.
The following table describes the parameters.
Parameter Description Microservice Space Select the region and microservice namespace where the application resides. Rule name Enter a name for the service degradation rule. The name can be up to 64 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). Description Enter a description for the service degradation rule. Service Provider Application Select the application that can be called by other applications. Downgrade service consumer applications Select the application that you want to downgrade. Service Degradation Rule List Click Add service downgrade rules to create a service degradation rule. Frame type Select Dubbo. Service method Select the application that you select from the Service Provider Application drop-down list and select the interface that is used to call the application. Effective strategy Select the policy based on which the service degradation rule takes effect. Valid values: Effective for all requests and Effective for abnormal requests. App to be downgraded Select the policy for the service degradation rule. If the rule is triggered, the specified content is returned. Valid values: Return Null, Return Exception, and Return custom Json data. Default state Turn on or off the switch to enable or disable the rule.
- On: enables the rule after it is created. By default, the switch is turned on.
- Off: disables the rule after it is created. To enable the rule, find the rule on the Service Degradation page and click Enable in the Operation column.