Zuul still routing to the instance of the application that are dead

15 Views Asked by At

I started several instances of the same spring boot application on different ports. On the other hand, I am using another application as a balancer(Eureka + Zuul proxy). I added annotations such are @EnableEurekaServer
and @EnableZuulProxy on the balancer side. I added properties to each instance:

eureka.instance.instance-id=application-name-[instance1]
eureka.instance.instance-id=application-name-[instance2]

In short, I did the setup and everything works as expected. But the problem starts when I Kill one of the instances. It takes 10-15 seconds while Eureka + Zuul understands that this instance is dead. If I continue calling my endpoint it works in round round-robin manner and still hits a dead instance on every second attempt. I've googled(Or chatGPT) a lot but can't find a proper workaround. Any ideas? Thanks in advance.

0

There are 0 best solutions below