You add Hystrix to your application as a library.
You identify the dependencies that your application relies on and configure Hystrix to monitor them.
When your application makes a call to a dependency, Hystrix intercepts the call and checks the health of the dependency.
If the dependency is healthy, Hystrix lets the call go through and returns the result to your application.
If the dependency is unhealthy, Hystrix opens the circuit breaker, which means it stops allowing calls to the dependency.
While the circuit breaker is open, Hystrix returns a fallback response to your application instead of letting it fail completely. This fallback response can be a default value or a cached value from a previous successful call to the dependency.
Hystrix periodically checks the health of the dependency, and if it’s recovered, it closes the circuit breaker and starts allowing calls to the dependency again.