0

Currently I am using Ribbon with Spring cloud gateway for load balancing (I am not using a discovery server for this and have provided a set of IP addresses to Ribbon). But since Ribbon's days are numbered I am willing to use Spring Cloud Loadbalancer as a replacement for Ribbon.

But I could not find any article/resource on how to config Spring Cloud Loadbalancer with Cloud Gateway.

Could you help me on resolving this issue.

Thanks

OlgaMaciaszek
  • 3,662
  • 1
  • 28
  • 32
tnishada
  • 1,315
  • 1
  • 16
  • 24

1 Answers1

0

To use Spring Cloud LoadBalancer in Hoxton release train releases, you need to set the value of spring.cloud.loadbalancer.ribbon.enabled to false (see the doc). If you want completely get rid of the dependencies in the classpath, you will need to add dependency exclusions in your classpath, but it is not necessary in order to just switch over to the SC LoadBalancer implementation.

For releases starting with the 2020.0.0, you don't need to that - SC LoadBalancer will be always used since Ribbon is not even present.

OlgaMaciaszek
  • 3,662
  • 1
  • 28
  • 32