0
votes

I am using Spring Cloud Netflix Zuul along with Eureka in our environment.

I assume internally Zuul uses Ribbon to do the load balancing after obtaining the instance info from Eureka.

I want to customize ribbon configuration when used with Zuul/Eureka.

I am not sure how to configure Ribbon when using with Zuul/Eureka to change to a different load balancing strategy.

If anyone has used that can you share details on the same.

1

1 Answers

0
votes

You can simply specify your specific rule in configuration properties, for example:

zuul.routes.example-service.path=/example-service/**
zuul.routes.example-service.serviceId=example-service
example-service.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.RetryRule

There is much more settings that you can define:

NFLoadBalancerClassName
NFLoadBalancerPingClassName
NFLoadBalancerRuleClassName
NIWSServerListClassName
NIWSServerListFilterClassName