本篇文章要体验Soul
网关中对Hystrix
熔断插件的支持。当系统承接的流量太大时,为防止这些大流量将系统压垮,常常考虑使用熔断机制,将请求断开,以保护系统。
参考之前的流程,启动soul-admin
和soul
网关,以及业务系统(本次的测试演示使用的是soul-examples-http
)。注意在soul
网关中,加入hystrix
插件。
<!-- soul hystrix plugin start-->
<dependency>
<groupId>org.dromara</groupId>
<artifactId>soul-spring-boot-starter-plugin-hystrix</artifactId