Questions tagged [hystrix]

In a distributed environment, failure of any given service is inevitable. Hystrix is a library designed to control the interactions between these distributed services providing greater latency and fault tolerance.

As of November 2018 Hystrix is officially in maintenance mode. New adaptors are encouraged to seek more modern alternatives, such as resilience4j.

Purpose of Hystrix

  • Give protection from and control over latency and failure from dependencies (typically accessed over network) accessed via 3rd party client libraries.
  • Stop cascading failures in a complex distributed system.
  • Fail fast and rapidly recover.
  • Fallback and gracefully degrade when possible.
  • Enable near real-time monitoring, alerting and operational control.

https://github.com/Netflix/Hystrix/wiki

734 questions
126
votes
3 answers

What is Bulkhead Pattern used by Hystrix?

Hystrix, a Netflix API for latency and fault tolerance in complex distributed systems uses Bulkhead Pattern technique for thread isolation. Can someone please elaborate on it.
Sashank
  • 1,450
  • 2
  • 12
  • 17
34
votes
2 answers

Which HTTP errors should never trigger an automatic retry?

I'm trying to make a few microservices more resilient and retrying certain types of HTTP requests would help with that. Retrying timeouts will give clients a terribly slow experience, so I don't intend to retry in this case. Retrying 400s doesn't…
cahen
  • 15,807
  • 13
  • 47
  • 78
34
votes
5 answers

Hystrix command fails with "timed-out and no fallback available"

I've noticed that some of the commands in my application fail with Caused by: ! com.netflix.hystrix.exception.HystrixRuntimeException: GetAPICommand timed-out and no fallback available. out: ! at…
dkulkarni
  • 2,780
  • 4
  • 27
  • 36
32
votes
2 answers

What is Hystrix in Spring?

Can someone please explain to me about Hystrix? I googled it, but still, I am not clear. What is Hystrix? Why do we use Hystrix? Please provide me with an example of Hystrix usage.
Anjanaa
  • 468
  • 1
  • 4
  • 13
30
votes
6 answers

Cannot disable Spring Cloud Config via spring.cloud.config.enabled:false

Let me preface this by saying that I'm not using Spring Cloud Config directly, it is transitive via Spring Cloud Hystrix starter. When only using @EnableHystrix, Spring Cloud also tries to locate a configuration server, expectedly unsuccessfully,…
bvulaj
  • 5,023
  • 5
  • 31
  • 45
25
votes
1 answer

Configuring hystrix command properties using application.yaml in Spring-Boot application

I am having same issue, where i am trying to override the hystrix properties in application.yaml. When I run the app & check the properties with localhost:port/app-context/hystrix.stream, I get all default values instead. here is the hystrix config…
Amrut
  • 971
  • 1
  • 9
  • 17
22
votes
2 answers

Spring Boot + Eureka Server + Hystrix with Turbine: empty turbine.stream

I'm trying to run Spring Boot (with Spring Cloud) + Eureka Server + Hystrix Dashboard and Turbine stream, but I run into a problem I couldn't find any solution so far. I use Spring Boot 1.2.1.RELEASE and Spring Cloud 1.0.0.RC2. Here is what I…
Szymon Stepniak
  • 40,216
  • 10
  • 104
  • 131
20
votes
1 answer

Hystrix: Custom circuit breaker and recovery logic

I just read the Hystrix guide and am trying to wrap my head around how the default circuit breaker and recovery period operate, and then how to customize their behavior. Obviously, if the circuit is tripped, Hystrix will automatically call the…
smeeb
  • 27,777
  • 57
  • 250
  • 447
19
votes
2 answers

Hystrix Configuration

I am trying to implement hystrix for my application using hystrix-javanica. I have configured hystrix-configuration.properties as…
Jay
  • 429
  • 2
  • 8
  • 23
19
votes
5 answers

Get failure exception in @HystrixCommand fallback method

Is there a way to get the reason a HystrixCommand failed when using the @HystrixCommand annotation within a Spring Boot application? It looks like if you implement your own HystrixCommand, you have access to the getFailedExecutionException but how…
Andrew Serff
  • 2,117
  • 4
  • 21
  • 32
17
votes
3 answers

How to say Hystrix not to trigger fallback for some of the exceptions in Hystrix command

We were using the Hystrix functionality by directly extending the HystrixCommand class. But for some of the business exceptions, Hystrix's fallback method is being triggered. I don't want to trigger the Hystrix fallback for some of the business…
LazyGuy
  • 715
  • 4
  • 12
  • 27
16
votes
2 answers

How to retry with hystrix

I have a hystrix command that encapsulates a REST call. In case of failure(e.g. timeout), I want to make a single retry and return an appropriate error if it still fails. As I can see, Hystrix doesn't support retries. The only way to do it with…
evgeniy44
  • 2,862
  • 7
  • 28
  • 51
16
votes
3 answers

Can I throw a custom error if a hystrix-protected call times out?

I have a feign client with this external call: @RequestMapping(method = RequestMethod.GET, value = "GetResourceA", consumes = "application/json") @Cacheable("ResourceA") List getResourceA() throws MyOwnException; And in my application.yml I…
L42
  • 3,052
  • 4
  • 28
  • 49
14
votes
2 answers

hystrixCommand annotation - what is purpose of commandKey

Using spring's Hystrix annotation described here I want to know what the commandKey param is. In the following context i want to know what this parameter means: @HystrixCommand(groupKey="UserGroup", commandKey = "GetUserByIdCommand") public User…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
14
votes
1 answer

Difference between thread-isolated and semaphore-isolated calls

I was going through the Netflix opensource feature Hystrix... I saw a statement "Today tens of billions of thread-isolated, and hundreds of billions of semaphore-isolated calls are executed via Hystrix every day at Netflix" Would like to know the…
shiv455
  • 7,384
  • 19
  • 54
  • 93
1
2 3
48 49