Hystrix + Spring Boot Implementation

What is Hystrix? How to use it in Spring Boot?

Vinesh
The Jabberjays

--

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services, and 3rd party libraries, stop cascading failure, and enable resilience in complex distributed systems where failure is inevitable. Hystrix is no longer in active development and is currently in maintenance mode. They kept it in maintenance as it is stable enough to meet the needs of Netflix, but they also suggest to use resilience4j.

How Does Hystrix Work?

Lets’ say we have an API class and we have a method annotated with @HystrixCommand and we mention a fallback method in it. So Hystrix wraps this API class in a proxy class, so whenever we request for an instance of this API class, we actually get the instance of this proxy class that Hystrix has created wrapped around the API class. This Proxy class contains the Circuit Breaker logic, it intercepts all the calls and performs its operations. You can check the Circuit Breaker Working here.

Dependencies To Be Added In Spring Boot

--

--

Vinesh
The Jabberjays

Coder 👨‍💻, Gamer🎮 and a dog person🐶. That says a lot about me, I guess😛.