explaingit

netflix/hystrix

24,460JavaAudience · developerComplexity · 3/5MaintainedLicenseSetup · easy

TLDR

Java library that prevents cascading failures in distributed systems by isolating failing services and returning fallback responses instead of letting failures spread.

Mindmap

mindmap
  root((Hystrix))
    What it does
      Circuit breaker pattern
      Isolates failures
      Fallback responses
    How it works
      Thread pool isolation
      Request caching
      Dependency monitoring
    Use cases
      Multi-service backends
      External API calls
      Database resilience
    Tech stack
      Java
      JVM libraries
    Status
      Maintenance mode
      Legacy project

Things people build with this

USE CASE 1

Prevent cascading failures when one backend service slows down or crashes.

USE CASE 2

Add fallback responses (cached data, defaults) so users see partial results instead of errors.

USE CASE 3

Isolate resource-hungry dependencies so they don't exhaust thread pools and crash other services.

USE CASE 4

Monitor and gracefully degrade when calling unreliable third-party APIs or databases.

Tech stack

Java

Getting it running

Difficulty · easy Time to first run · 5min
Apache License 2.0, use freely for any purpose, including commercial use, as long as you include the license notice and document any changes.

In plain English

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.

Copy-paste prompts

Prompt 1
Show me how to set up a Hystrix circuit breaker for a Java service that calls an external API, with a fallback response if the API is down.
Prompt 2
How do I use Hystrix thread pool isolation to prevent one slow database query from blocking all other requests in my Java application?
Prompt 3
Give me a working example of Hystrix request caching to avoid redundant calls to the same dependency within a single request.
Prompt 4
What's the difference between Hystrix and resilience4j, and should I migrate my legacy Java service to resilience4j?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.