Background
I am using Spring Cloud Brixton.RC2, with Zuul and Eureka.
I have a gateway service with @EnableZuulProxy and book-service using the status method. Through the configuration, I can emulate the work on the status method, sleeping for a certain amount of time.
Zuul's path is simple
zuul.routes.foos.path=/foos/** zuul.routes.foos.serviceId=reservation-service
I am running two instances of book-service . When I set the sleep time below the Hystrix timeout threshold (1000 ms), I can see the requests going as an instance of book services. It works well.
Problem
I understand that if the Hystrix command fails, Ribbon must retry the command on another server. This should make the failure transparent to the client.
I read the tape configuration and added the following configuration to Zuul:
zuul.routes.reservation-service.retryable=true //not sure which one to try zuul.routes.foos.retryable=true //not sure which one to try ribbon.MaxAutoRetries=0 // I don't want to retry on the same host, I also tried with 1 it doesn't work either ribbon.MaxAutoRetriesNextServer=2 ribbon.OkToRetryOnAllOperations=true
Now I am updating the configuration so that only one service falls asleep for more than 1 second, which means that I have one health service and one bad one.
When I call the gateways, the calls are sent to both instances, and half the calls return 500. In the gateway, I see the Hystrix timeout:
com.netflix.zuul.exception.ZuulException: Forwarding error [...] Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: reservation-service timed-out and no fallback available. [...] Caused by: java.util.concurrent.TimeoutException: null
Why doesn't the tape repeat calling another instance?
Did I miss something here?
References