We have an infrastructure with our own API gateway, service discovery and load balancing. However for resiliency purposes I need to use Hystrix.
First, we need to add the Spring Cloud Starter Hystrix dependency in our build configuration file. Now, add the @EnableHystrix annotation into your main Spring Boot application class file. The @EnableHystrix annotation is used to enable the Hystrix functionalities into your Spring Boot application.
Akka, Envoy, Istio, Zuul, and Polly are the most popular alternatives and competitors to Hystrix.
Hystrix has been removed from Spring Cloud Netflix and it was the only implementation using this annotation. This annotation has been deprecated as of the 3.0. 1 release. @EnableDiscoveryClient is no longer needed, discovery client implementations are enabled as long as an implementation is on the classpath.
Spring Cloud Hystrix can be used without ribbon or eureka, just use spring-cloud-starter-hystrix
. The hystrix dashboard can be used by directly going to each instances hystrix.stream
one at a time. Hystrix can be used without spring boot if you use the Netflix package directly without using Spring Cloud.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With