diff --git a/2.2.x/reference/html/appendix.html b/2.2.x/reference/html/appendix.html index 288d1d67..ea4ed70a 100644 --- a/2.2.x/reference/html/appendix.html +++ b/2.2.x/reference/html/appendix.html @@ -275,6 +275,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>
Causes RibbonLoadBalancerClient to be used by default.
spring.cloud.loadbalancer.service-discovery.timeout
String representation of Duration of the timeout for calls to service discovery.
spring.cloud.loadbalancer.zone
Spring Cloud LoadBalancer zone.
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
@@ -1621,12 +1630,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.
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.
DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier.
You could use this sample configuration to set it up:
@@ -1652,14 +1669,6 @@ We suggest passing aDiscoveryClientServiceInstanceListSupplier 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.
In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.
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.
In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.
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.
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
@@ -1621,12 +1630,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.
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.
DiscoveryClientServiceInstanceListSupplier delegate in the constructor of HealthCheckServiceInstanceListSupplier.
You could use this sample configuration to set it up:
@@ -1652,14 +1669,6 @@ We suggest passing aDiscoveryClientServiceInstanceListSupplier 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.
In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.
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.
In order to make working on your own LoadBalancer configuration easier, we have added a builder() method to the ServiceInstanceListSupplier class.
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.