Browse Source

Merge pull request #294 from joshiste/master

Docs: Example of static, loadbalanced Zuul configuration
pull/6/head
Spencer Gibb 10 years ago
parent
commit
9699664e09
  1. 17
      docs/src/main/asciidoc/spring-cloud-netflix.adoc

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

@ -837,6 +837,23 @@ The location of the backend can be specified as either a "serviceId" @@ -837,6 +837,23 @@ The location of the backend can be specified as either a "serviceId"
url: http://example.com/users_service
----
These simple url-routes doesn't get executed as HystrixCommand nor can you loadbalance multiple url with Ribbon.
To achieve this specify a service-route and configure a Ribbon client for the serviceId, e.g.
.application.yml
[source,yaml]
----
zuul:
routes:
users:
path: /myusers/**
serviceId: users
users:
ribbon:
listOfServers: example.com,google.com
----
To add a prefix to all mappings, set `zuul.prefix` to a value, such as
`/api`. The proxy prefix is stripped from the request before the
request is forwarded by default (switch this behaviour off with

Loading…
Cancel
Save