Wrap calls to an external API so your app returns a cached fallback instead of crashing when that API goes down.
Prevent one slow database query from exhausting all threads and bringing down an entire Java microservice.
Isolate third-party service calls into separate thread pools so a failing vendor cannot affect your core logic.
Monitor which dependencies are failing most often in a distributed Java system.
No longer actively maintained, Netflix recommends resilience4j for new projects.
Hystrix is a Java library from Netflix designed to make distributed systems more resilient when individual components fail. In a complex application made up of many services that call each other, one slow or failing service can cause a chain reaction that takes down everything, this is called cascading failure. Hystrix was built to prevent that. It does this through the circuit breaker pattern. A circuit breaker monitors calls to a dependency (like another service or database). If that dependency starts failing or responding too slowly too often, the circuit breaker trips open and stops sending it requests. Instead, a fallback response is returned immediately, for example, a cached result or a default value, so the rest of the system keeps functioning while the problem is isolated and the dependency has time to recover. Hystrix also supports running calls in isolated thread pools and request caching, so a misbehaving dependency cannot exhaust shared resources and bring everything else down with it. You would use Hystrix in Java backend systems that call multiple external services, databases, or third-party APIs, and where you need graceful degradation under failure conditions. Note: Hystrix is no longer actively developed and is in maintenance mode. Netflix recommends resilience4j for new projects. The tech stack is Java.
← netflix on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.