When I initially learn about spring boot, I've learnt about spring cloud netflix hystrix
as a circuit breaker. There were bunch of options such as multiple application properties and annotation base declarations for fault tolerance. In-addition to that, it has few important threshold values as well. Most importantly hystrix
the data can be prompted to hystrix dashboard
via hystrix streams
. With the use of turbine
we can combine multiple hystrix streams
and overview microservices. That is my experience from hystrix
.
Now I have a requirement to implement Resilience4j
which is basically supporting the same behaviour for fault tolerance. I am new to Resilience4j
and I would like to know the main difference of these two fault tolerance options before getting started. According to my research Resilience4j
is a robust option than hystrix
. I would be grateful to know the expert facts and thank you.
I can say it really does not matter which implementation you choose unless there are specific requirements that would favor a particular implementation. I would not pick anything from Netflix Hystrix as it is in maintenance mode as of 2018 (https://spring.io/blog/2018/12/12/spring-cloud-greenwich-rc1-available-now). Read the Hystrix status at GitHub: https://github.com/Netflix/Hystrix#hystrix-status.
Let me emphasize this: "What I find more important from the architectural point of view is to enable an environment where it is easy to replace such implementation as needed."
I can recommend using Spring Cloud Circuit Breaker as a framework that has a consistent API and allows developers to pick the implementation: Netflix Hystrix, reactive or non-reactive Resilience4j, Sentinel, and Spring Retry.
All can be configured as necessary, and all provide a basic default configuration to change value thresholds, slow call thresholds, sliding window size, etc.