我正在使用带有Eureka的Ribbon。
我的应用程序能够在以下两种配置中调用other-service。第一种配置中我使用NIWSServerListClassName
,第二种配置中我使用listOfServers
。
other-service:
ribbon:
eureka:
enabled: true
NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
ServerListRefreshInterval: 1000
.
other-service:
ribbon:
eureka:
enabled: true
listOfServers: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
ServerListRefreshInterval: 1000
我在spring-cloud-netflix的GitHub问题中(以及某些文档中)看到过NIWSServerListClassName
和listOfServers
两个属性都被用于获取ribbon的服务器列表。
这两个ribbon属性有什么区别?它们是否具有相同的目的?