From 850e7f52febe5ba5d45c61dfdb0446a462b40439 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 27 May 2020 18:19:13 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- reference/html/appendix.html | 10 ++++++ reference/html/index.html | 39 ++++++++++++++++++------ reference/html/spring-cloud-commons.html | 39 ++++++++++++++++++------ 3 files changed, 70 insertions(+), 18 deletions(-) diff --git a/reference/html/appendix.html b/reference/html/appendix.html index 039d4a11..0befb0b6 100644 --- a/reference/html/appendix.html +++ b/reference/html/appendix.html @@ -294,6 +294,11 @@ Also, you can define your own properties.

Initial cache capacity expressed as int.

+

spring.cloud.loadbalancer.cache.enabled

+

true

+

Enables Spring Cloud LoadBalancer caching mechanism.

+ +

spring.cloud.loadbalancer.cache.ttl

35s

Time To Live - time counted from writing of the record, after which cache entries are expired, expressed as a {@link Duration}. The property {@link String} has to be in keeping with the appropriate syntax as specified in Spring Boot <code>StringToDurationConverter</code>. @see <a href= "https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToDurationConverter.java">StringToDurationConverter.java</a>

@@ -324,6 +329,11 @@ Also, you can define your own properties.

Causes RibbonLoadBalancerClient to be used by default.

+

spring.cloud.loadbalancer.service-discovery.timeout

+

null

+

String representation of Duration of the timeout for calls to service discovery.

+ +

spring.cloud.loadbalancer.zone

null

Spring Cloud LoadBalancer zone.

diff --git a/reference/html/index.html b/reference/html/index.html index 72b19796..9a305778 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -1576,6 +1576,15 @@ healthy instances after querying the external ServiceDiscovery. +
+
+
TIP
+
+

This supplier is also recommended for setups with a small number of instances per service +in order to avoid retrying calls on a failing instance.

+
+
+

HealthCheckServiceInstanceListSupplier uses properties prefixed with spring.cloud.loadbalancer.healthcheck. You can set the initialDelay and interval @@ -1583,12 +1592,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti the value of the spring.cloud.loadbalancer.healthcheck.path.default. You can also set a specific value for any given service by setting the value of the spring.cloud.loadbalancer.healthcheck.path.[SERVICE_ID], substituting the [SERVICE_ID] with the correct ID of your service. If the path is not set, /actuator/health is used by default.

+
+
+
TIP
+
+

If you rely on the default path (/actuator/health), make sure you add spring-boot-starter-actuator to your collaborator’s dependencies, unless you are planning to add such an endpoint on your own.

+
+
+

In order to use the health-check scheduler approach, you will have to instantiate a HealthCheckServiceInstanceListSupplier bean in a custom configuration.

We use delegates to work with ServiceInstanceListSupplier beans. -We suggest passing a DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier and, in turn, wrapping the latter with a CachingServiceInstanceListSupplier to leverage LoadBalancer caching mechanism.

+We suggest passing a DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier.

You could use this sample configuration to set it up:

@@ -1614,14 +1631,6 @@ We suggest passing a DiscoveryClientServiceInstanceListSupplier del

HealthCheckServiceInstanceListSupplier has its own caching mechanism based on Reactor Flux replay(), therefore, if it’s being used, you may want to skip wrapping that supplier with CachingServiceInstanceListSupplier.

-
TIP
-
-

In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.

-
-
TIP
-
-

You can also use our alternative predefined configurations in place of the default ones by setting the value of spring.cloud.loadbalancer.configurations property to zone-preference to use ZonePreferenceServiceInstanceListSupplier with caching or to health-check to use HealthCheckServiceInstanceListSupplier with caching.

-
@@ -1667,6 +1676,18 @@ public class MyConfiguration { } +
+
+
TIP
+
+

In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.

+
+
TIP
+
+

You can also use our alternative predefined configurations in place of the default ones by setting the value of spring.cloud.loadbalancer.configurations property to zone-preference to use ZonePreferenceServiceInstanceListSupplier with caching or to health-check to use HealthCheckServiceInstanceListSupplier with caching.

+
+
+
diff --git a/reference/html/spring-cloud-commons.html b/reference/html/spring-cloud-commons.html index 72b19796..9a305778 100644 --- a/reference/html/spring-cloud-commons.html +++ b/reference/html/spring-cloud-commons.html @@ -1576,6 +1576,15 @@ healthy instances after querying the external ServiceDiscovery.
+
+
+
TIP
+
+

This supplier is also recommended for setups with a small number of instances per service +in order to avoid retrying calls on a failing instance.

+
+
+

HealthCheckServiceInstanceListSupplier uses properties prefixed with spring.cloud.loadbalancer.healthcheck. You can set the initialDelay and interval @@ -1583,12 +1592,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti the value of the spring.cloud.loadbalancer.healthcheck.path.default. You can also set a specific value for any given service by setting the value of the spring.cloud.loadbalancer.healthcheck.path.[SERVICE_ID], substituting the [SERVICE_ID] with the correct ID of your service. If the path is not set, /actuator/health is used by default.

+
+
+
TIP
+
+

If you rely on the default path (/actuator/health), make sure you add spring-boot-starter-actuator to your collaborator’s dependencies, unless you are planning to add such an endpoint on your own.

+
+
+

In order to use the health-check scheduler approach, you will have to instantiate a HealthCheckServiceInstanceListSupplier bean in a custom configuration.

We use delegates to work with ServiceInstanceListSupplier beans. -We suggest passing a DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier and, in turn, wrapping the latter with a CachingServiceInstanceListSupplier to leverage LoadBalancer caching mechanism.

+We suggest passing a DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier.

You could use this sample configuration to set it up:

@@ -1614,14 +1631,6 @@ We suggest passing a DiscoveryClientServiceInstanceListSupplier del

HealthCheckServiceInstanceListSupplier has its own caching mechanism based on Reactor Flux replay(), therefore, if it’s being used, you may want to skip wrapping that supplier with CachingServiceInstanceListSupplier.

-
TIP
-
-

In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.

-
-
TIP
-
-

You can also use our alternative predefined configurations in place of the default ones by setting the value of spring.cloud.loadbalancer.configurations property to zone-preference to use ZonePreferenceServiceInstanceListSupplier with caching or to health-check to use HealthCheckServiceInstanceListSupplier with caching.

-
@@ -1667,6 +1676,18 @@ public class MyConfiguration { } +
+
+
TIP
+
+

In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.

+
+
TIP
+
+

You can also use our alternative predefined configurations in place of the default ones by setting the value of spring.cloud.loadbalancer.configurations property to zone-preference to use ZonePreferenceServiceInstanceListSupplier with caching or to health-check to use HealthCheckServiceInstanceListSupplier with caching.

+
+
+