zuul currently can do "simple host router" by http client, which is one-one router, I think it should be able to use ribbon client if need to support multiple hosts router for load balance purpose.

Comment From: ryanjbaxter

Zuul already does use Ribbon. Can you elaborate?

Comment From: huangfushun

it is one suggestion for "SimpleHostRoutingFilter" which construct url from SimpleRouteLocator#81 currently it does not support load balance . and I would like to see if we can only can do any change like executeWithLoadBalancer

Comment From: ryanjbaxter

If you do not want to use Eureka to provide service information to Zuul you can provide a list of servers to Ribbon for Zuul to use and load balance between.

zuul:
  routes:
    users:
      path: /myusers/**
      serviceId: users

ribbon:
  eureka:
    enabled: false

users:
  ribbon:
    listOfServers: example.com,google.com

Comment From: huangfushun

yes, it works, but we should think about not to change service discovery and just additionally support like below config:

zuul:
  routes:
    users:
      path: /myusers/**
      listOfServers: example.com,google.com

Comment From: ryanjbaxter

Zuul does not necessarily need to use Ribbon so having those properties under zuul does not make sense.

Comment From: spencergibb

You can also leave ribbon enabled and set

users:
  ribbon:
    NIWSServerListClassName: com.netflix.loadbalancer.ConfigurationBasedServerList
    listOfServers: example.com,google.com

Closing as there is a way to do this currently and adding the feature is more work and maintenance than the few lines of configuration.

Comment From: MR-Os1

hi i was wondering how can we setup this configurations dynamically. i mean in real time when the application is up. what are the classes that hold server addresses. thank you.