Commit bd82dfc38f8ef26bb6431f557d841f4acc01bde3

Authored by luotong
1 parent d9b97ac7

线上环境添加消费负载均衡配置和获得服务注册列表

Showing 1 changed file with 40 additions and 2 deletions
class-service.yml
@@ -212,9 +212,28 @@ eureka: @@ -212,9 +212,28 @@ eureka:
212 perferIpAddress: true 212 perferIpAddress: true
213 client: 213 client:
214 registerWithEureka: true 214 registerWithEureka: true
215 - fetchRegistry: false 215 + fetchRegistry: true
216 serviceUrl: 216 serviceUrl:
217 defaultZone: http://discovery:15200/eureka/ 217 defaultZone: http://discovery:15200/eureka/
  218 +
  219 +hystrix:
  220 + command:
  221 + default:
  222 + execution:
  223 + timeout:
  224 + enabled: true
  225 + isolation:
  226 + thread:
  227 + timeoutInMilliseconds: 60000
  228 +
  229 +#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
  230 +#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
  231 +ribbon:
  232 + eureka:
  233 + enabled: true
  234 + UseIPAddrForServer: true
  235 + ReadTimeout: 5000
  236 + ConnectTimeout: 10000
218 237
219 # 一些公共的常量配置 238 # 一些公共的常量配置
220 apiConfig: 239 apiConfig:
@@ -306,9 +325,28 @@ eureka: @@ -306,9 +325,28 @@ eureka:
306 perferIpAddress: true 325 perferIpAddress: true
307 client: 326 client:
308 registerWithEureka: true 327 registerWithEureka: true
309 - fetchRegistry: false 328 + fetchRegistry: true
310 serviceUrl: 329 serviceUrl:
311 defaultZone: http://discovery:15200/eureka/ 330 defaultZone: http://discovery:15200/eureka/
  331 +
  332 +hystrix:
  333 + command:
  334 + default:
  335 + execution:
  336 + timeout:
  337 + enabled: true
  338 + isolation:
  339 + thread:
  340 + timeoutInMilliseconds: 60000
  341 +
  342 +#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
  343 +#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
  344 +ribbon:
  345 + eureka:
  346 + enabled: true
  347 + UseIPAddrForServer: true
  348 + ReadTimeout: 5000
  349 + ConnectTimeout: 10000
312 350
313 # 一些公共的常量配置 351 # 一些公共的常量配置
314 apiConfig: 352 apiConfig: