1
votes

I have Zuul which is trying to connect to Student Service through Eureka. I have 8 Instances of Student Service registered with Eureka. Zuul is supposed to connect to any one of the Student Service and do load balancing.

I am observing when I have less Student Service Instances Response Time is less but when I have increased the instances Response time is getting increased.

Zuul Configuration :

hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false

ribbon:
  ReadTimeout: 30000
  ConnectTimeout: 30000

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
  instance:
    hostname: localhost

I am assuming whenever We have more Service instances in Eureka, Zuul is taking time to resolve for any one of the service instance and calling that. How can I reduce this Response time ?

1

1 Answers

0
votes

Also add below configuration to make it work:

#(ribbon.ReadTimeout + ribbon.connectTimeout) * (1+ribbon.maxAutoRetries(default 0) * (ribbon.MaxAutoRetriesNextServer (default 1) + 1)
#timeoutInMilliseconds= (5000 + 5000) * (1+0)*(1+1) =20000

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=21000

Note: Though the IDEs complain this is unknown property, it still works.