Spring env, should I still use Hystrix on new project

Viewed 6653

Seems that hystrix is near end of life and that netflix stack is now a bit deprecated. We're building a stack for a brand new project and we need a circuit breaker, our default choice would have been hystrix as it is well known and appreciated by the team.

Today hystrix is fully integrated in spring cloud, is there any plan to remove it soon ?

4 Answers

Spring Cloud Circuit breaker provides an abstraction across different circuit breaker implementations. It provides a consistent API to use in your applications allowing you the developer to choose the circuit breaker implementation that best fits your needs for your app.

Supported Implementations

  • Netfix Hystrix

  • Resilience4J

  • Sentinel

  • Spring Retry

The main benefit of using this is you have option to choose different circuit breaker libraries. Migration from one to other pain point is less.

There is nice documentation and sample code on official website

Definitely not. Spring Cloud Hystrix is in maintenance mode and will not be available any more starting from the 2020.0.0 release train (support removed with this commit). Resilience4J is a good replacement.

Resilience4j is the da circuit-breaker inspired by Hystrix (from Netflix). You can read more about the project on their webpage or github, but in short:

Resilience4j is a lightweight, easy-to-use fault tolerance library inspired by Netflix Hystrix, but designed for Java 8 and functional programming.

And they have a getting-started for spring-cloud as well =)

Edit: rewrote first sentence not to mention it is from Netflix because I am not sure =)

Hystrix is not compatible with SpringBoot Greenwich RS6 onwards. Filters and fallback methods are deprecated and do not work anymore. Definitely Hystrix is not the option.

Related