Updated on 2023-11-08 GMT+08:00

Fault Injection

You can use fault injection on the consumer side to configure the latency, fault, and triggering probability of requests sent to a specified microservice to ensure that core services are accessed only by key microservices during peak hours.

Spring Cloud Huawei does not support fault injection.

Fault injection of Java chassis is used for microservice consumers. The fault injection module must be integrated into microservice applications and the fault-injection-consumer processing chain must be enabled.
servicecomb:
  handler:
    chain:
      Consumer:
        default:  loadbalance,fault-injection-consumer

Add the following dependency to the POM file:

<dependency>
   <groupId>org.apache.servicecomb</groupId>
   <artifactId>handler-fault-injection</artifactId>
   <version>${project.version}</version>
</dependency>

For details, see ServiceComb Fault Injection Development Guide.