Browse Source

Merge branch 'tiny-dancer-patch-1'

pull/6/head
Spencer Gibb 7 years ago
parent
commit
d7c13adac0
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 37
      docs/src/main/asciidoc/spring-cloud-netflix.adoc

37
docs/src/main/asciidoc/spring-cloud-netflix.adoc

@ -833,6 +833,7 @@ To set the `IRule` for a service name `users` you could set the following: @@ -833,6 +833,7 @@ To set the `IRule` for a service name `users` you could set the following:
----
users:
ribbon:
NIWSServerListClassName: com.netflix.loadbalancer.ConfigurationBasedServerList
NFLoadBalancerRuleClassName: com.netflix.loadbalancer.WeightedResponseTimeRule
----
@ -1500,9 +1501,39 @@ The location of the backend can be specified as either a "serviceId" @@ -1500,9 +1501,39 @@ The location of the backend can be specified as either a "serviceId"
url: http://example.com/users_service
----
These simple url-routes don't get executed as a `HystrixCommand` nor can you loadbalance multiple URLs with Ribbon.
To achieve this, specify a service-route and configure a Ribbon client for the
serviceId (this currently requires disabling Eureka support in Ribbon:
These simple url-routes don't get executed as a `HystrixCommand` nor do they loadbalance multiple URLs with Ribbon.
To achieve this, you can specify a `serviceId` with a static list of servers:
.application.yml
[source,yaml]
----
zuul:
routes:
echo:
path: /myusers/**
serviceId: myusers-service
stripPrefix: true
hystrix:
command:
myusers-service:
execution:
isolation:
thread:
timeoutInMilliseconds: ...
myusers-service:
ribbon:
NIWSServerListClassName: com.netflix.loadbalancer.ConfigurationBasedServerList
ListOfServers: http://example1.com,http://example2.com
ConnectTimeout: 1000
ReadTimeout: 3000
MaxTotalHttpConnections: 500
MaxConnectionsPerHost: 100
----
Another method is specifiying a service-route and configure a Ribbon client for the
serviceId (this requires disabling Eureka support in Ribbon:
see <<spring-cloud-ribbon-without-eureka,above for more information>>), e.g.
.application.yml

Loading…
Cancel
Save