<tdclass="tableblock halign-left valign-top"><pclass="tableblock">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></p></td>
@ -305,6 +310,11 @@ Also, you can define your own properties.
@@ -305,6 +310,11 @@ Also, you can define your own properties.
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Causes <code>RibbonLoadBalancerClient</code> to be used by default.</p></td>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">String representation of Duration of the timeout for calls to service discovery.</p></td>
@ -1614,6 +1614,15 @@ healthy instances after querying the external ServiceDiscovery.
@@ -1614,6 +1614,15 @@ healthy instances after querying the external ServiceDiscovery.
</tr>
</table>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>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.</p>
</dd>
</dl>
</div>
<divclass="paragraph">
<p><code>HealthCheckServiceInstanceListSupplier</code> uses properties prefixed with
<code>spring.cloud.loadbalancer.healthcheck</code>. You can set the <code>initialDelay</code> and <code>interval</code>
@ -1621,12 +1630,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti
@@ -1621,12 +1630,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti
the value of the <code>spring.cloud.loadbalancer.healthcheck.path.default</code>. You can also set a specific value
for any given service by setting the value of the <code>spring.cloud.loadbalancer.healthcheck.path.[SERVICE_ID]</code>, substituting the <code>[SERVICE_ID]</code> with the correct ID of your service. If the path is not set, <code>/actuator/health</code> is used by default.</p>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>If you rely on the default path (<code>/actuator/health</code>), make sure you add <code>spring-boot-starter-actuator</code> to your collaborator’s dependencies, unless you are planning to add such an endpoint on your own.</p>
</dd>
</dl>
</div>
<divclass="paragraph">
<p>In order to use the health-check scheduler approach, you will have to instantiate a <code>HealthCheckServiceInstanceListSupplier</code> bean in a <ahref="#custom-loadbalancer-configuration">custom configuration</a>.</p>
</div>
<divclass="paragraph">
<p>We use delegates to work with <code>ServiceInstanceListSupplier</code> beans.
We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> delegate in the constructor of <code>HealthCheckServiceInstanceListSupplier</code> and, in turn, wrapping the latter with a <code>CachingServiceInstanceListSupplier</code> to leverage <ahref="#loadbalancer-caching">LoadBalancer caching mechanism</a>.</p>
We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> delegate in the constructor of <code>HealthCheckServiceInstanceListSupplier</code>.</p>
</div>
<divclass="paragraph">
<p>You could use this sample configuration to set it up:</p>
@ -1652,14 +1669,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1652,14 +1669,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
<dd>
<p><code>HealthCheckServiceInstanceListSupplier</code> has its own caching mechanism based on Reactor Flux <code>replay()</code>, therefore, if it’s being used, you may want to skip wrapping that supplier with <code>CachingServiceInstanceListSupplier</code>.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>You can also use our alternative predefined configurations in place of the default ones by setting the value of <code>spring.cloud.loadbalancer.configurations</code> property to <code>zone-preference</code> to use <code>ZonePreferenceServiceInstanceListSupplier</code> with caching or to <code>health-check</code> to use <code>HealthCheckServiceInstanceListSupplier</code> with caching.</p>
</dd>
</dl>
</div>
</div>
@ -1718,6 +1727,18 @@ public class MyConfiguration {
@@ -1718,6 +1727,18 @@ public class MyConfiguration {
}</code></pre>
</div>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>You can also use our alternative predefined configurations in place of the default ones by setting the value of <code>spring.cloud.loadbalancer.configurations</code> property to <code>zone-preference</code> to use <code>ZonePreferenceServiceInstanceListSupplier</code> with caching or to <code>health-check</code> to use <code>HealthCheckServiceInstanceListSupplier</code> with caching.</p>
@ -1614,6 +1614,15 @@ healthy instances after querying the external ServiceDiscovery.
@@ -1614,6 +1614,15 @@ healthy instances after querying the external ServiceDiscovery.
</tr>
</table>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>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.</p>
</dd>
</dl>
</div>
<divclass="paragraph">
<p><code>HealthCheckServiceInstanceListSupplier</code> uses properties prefixed with
<code>spring.cloud.loadbalancer.healthcheck</code>. You can set the <code>initialDelay</code> and <code>interval</code>
@ -1621,12 +1630,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti
@@ -1621,12 +1630,20 @@ for the scheduler. You can set the default path for the healthcheck URL by setti
the value of the <code>spring.cloud.loadbalancer.healthcheck.path.default</code>. You can also set a specific value
for any given service by setting the value of the <code>spring.cloud.loadbalancer.healthcheck.path.[SERVICE_ID]</code>, substituting the <code>[SERVICE_ID]</code> with the correct ID of your service. If the path is not set, <code>/actuator/health</code> is used by default.</p>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>If you rely on the default path (<code>/actuator/health</code>), make sure you add <code>spring-boot-starter-actuator</code> to your collaborator’s dependencies, unless you are planning to add such an endpoint on your own.</p>
</dd>
</dl>
</div>
<divclass="paragraph">
<p>In order to use the health-check scheduler approach, you will have to instantiate a <code>HealthCheckServiceInstanceListSupplier</code> bean in a <ahref="#custom-loadbalancer-configuration">custom configuration</a>.</p>
</div>
<divclass="paragraph">
<p>We use delegates to work with <code>ServiceInstanceListSupplier</code> beans.
We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> delegate in the constructor of <code>HealthCheckServiceInstanceListSupplier</code> and, in turn, wrapping the latter with a <code>CachingServiceInstanceListSupplier</code> to leverage <ahref="#loadbalancer-caching">LoadBalancer caching mechanism</a>.</p>
We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> delegate in the constructor of <code>HealthCheckServiceInstanceListSupplier</code>.</p>
</div>
<divclass="paragraph">
<p>You could use this sample configuration to set it up:</p>
@ -1652,14 +1669,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1652,14 +1669,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
<dd>
<p><code>HealthCheckServiceInstanceListSupplier</code> has its own caching mechanism based on Reactor Flux <code>replay()</code>, therefore, if it’s being used, you may want to skip wrapping that supplier with <code>CachingServiceInstanceListSupplier</code>.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>You can also use our alternative predefined configurations in place of the default ones by setting the value of <code>spring.cloud.loadbalancer.configurations</code> property to <code>zone-preference</code> to use <code>ZonePreferenceServiceInstanceListSupplier</code> with caching or to <code>health-check</code> to use <code>HealthCheckServiceInstanceListSupplier</code> with caching.</p>
</dd>
</dl>
</div>
</div>
@ -1718,6 +1727,18 @@ public class MyConfiguration {
@@ -1718,6 +1727,18 @@ public class MyConfiguration {
}</code></pre>
</div>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>You can also use our alternative predefined configurations in place of the default ones by setting the value of <code>spring.cloud.loadbalancer.configurations</code> property to <code>zone-preference</code> to use <code>ZonePreferenceServiceInstanceListSupplier</code> with caching or to <code>health-check</code> to use <code>HealthCheckServiceInstanceListSupplier</code> with caching.</p>