From 5166994f7cf5958b64e3b45e7312b267bf4acf08 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 30 Apr 2015 09:42:28 -0600 Subject: [PATCH] add documentation for ribbon.eureka.enabled fixes gh-325 --- .../main/asciidoc/spring-cloud-netflix.adoc | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-netflix.adoc b/docs/src/main/asciidoc/spring-cloud-netflix.adoc index b629fdbb..428a8491 100644 --- a/docs/src/main/asciidoc/spring-cloud-netflix.adoc +++ b/docs/src/main/asciidoc/spring-cloud-netflix.adoc @@ -650,6 +650,18 @@ stores: listOfServers: example.com,google.com ---- +=== Example: Disable Eureka use in Ribbon + +Setting the property `ribbon.eureka.enabled = false` will explicitly +disable the use of Eureka in Ribbon. + +.application.yml +---- +ribbon: + eureka: + enabled: false +---- + === Using the Ribbon API Directly You can also use the `LoadBalancerClient` directly. Example: @@ -838,18 +850,24 @@ The location of the backend can be specified as either a "serviceId" ---- 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. +To achieve this specify a service-route and configure a Ribbon client for the +serviceId (this currently requires disabling Eureka support in Ribbon: +see <>), e.g. .application.yml [source,yaml] ---- - zuul: +zuul: routes: users: path: /myusers/** serviceId: users - - users: + +ribbon: + eureka: + enabled: false + +users: ribbon: listOfServers: example.com,google.com ----