错误注入
用户在consumer端使用故障注入,可以设置发往指定微服务的请求的时延和错误及其触发概率用来在业务高峰期时保护核心业务只被关键微服务访问。
Spring Cloud Huawei暂不支持错误注入治理策略。
servicecomb:
handler:
chain:
Consumer:
default: loadbalance,fault-injection-consumer
在POM中添加如下依赖:
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>handler-fault-injection</artifactId>
<version>${project.version}</version>
</dependency>
详细说明请参考servicecomb错误注入开发指南。