Updated on 2025-08-29 GMT+08:00

Configuring a Service Degradation Policy

When a microservice invokes other microservices, the default value is forcibly returned or an exception is thrown instead of sending the request to the target microservice. In this way, the access to the target microservice is shielded and the pressure on the target microservice is reduced.

Prerequisites

You have created a microservice by referring to Creating a Microservice. After the microservice starts, the service instance is registered with the corresponding service based on the configurations in the YAML file. If the microservice is not created in advance or has been deleted, the microservice is automatically created when the service instance is registered.

Configuring Service Degradation

  1. Click the target engine.
  2. Choose Microservice Governance.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click the target microservice. Click Service Degradation.
  5. Click New and select a proper policy. The following table describes the configuration items of service degradation.

    Figure 1 Configuring service degradation (for microservices accessed through Spring Cloud)

    Figure 2 Configuring service degradation (for microservices accessed through Java chassis)

    Parameter

    Description

    Fallback Object

    Microservice to be degraded.

    When microservices are accessed through Java chassis, one or more methods in the selected microservice are used as the object.

    Request Path

    This configuration applies to microservices accessed through Spring Cloud.

    You can click and set Method (such as GET, POST, and PUT), Path (request path), and Headers to filter requests.

    Fallback

    • Open: enables service degradation and sets parameters.
    • Close: disables service degradation.

  6. Click OK.