Updated on 2023-07-14 GMT+08:00

Microservice Governance

Scenarios

Microservice engines provide governance policies such as load balancing, service degradation, rate limiting, fault tolerance, circuit breaker, fault injection, blacklist, and whitelist.

User Story

You can configure governance policies in advance based on actual service scenarios to flexibly respond to service requirement changes and ensure stable running of applications.

Service degradation: In this practice, if the number of frontend requests increases sharply, the system responds slowly or may even break down. In this case, you can degrade the forecast microservice from fusionweather and request only important real-time weather data to ensure the proper running of important service functions and restore the service when traffic peaks are over.

Service Degradation

ServiceStage supports service degradation by microservice or API. The following uses the forecast microservice as an example.

  1. Log in to ServiceStage.
  2. Choose Cloud Service Engine > Microservice Governance.
  3. Select the microservice engine where the weather forecast component is deployed from the Microservice Engine drop-down list.
  4. Select weathermap from the All applications drop-down list.
  5. Click the fusionweather microservice. The Microservice Governance page is displayed.

    Figure 1 Accessing the Microservice Governance page

  6. Set a service degradation policy.

    1. Select Service Degradation.
    2. Click New.
    3. Set Service Degradation Object to forecast.
    4. Disable Request Path.
    5. Set Service Degradation to Open.
    6. Click OK.
    Figure 2 Setting a service degradation policy

  7. Check the configurations.

    Access the application. The weather forecast on the right is blank.

    Figure 3 Microservice degraded

  8. Click to delete the service degradation policy to prevent it from affecting user experience.

    Figure 4 Deleting a policy