Sync docs from 2.2.x to gh-pages
This commit is contained in:
@@ -1499,7 +1499,7 @@ as the value of the <code>spring.cloud.loadbalancer.cache.ttl</code> property.
|
||||
You can also set your own LoadBalancer cache initial capacity by setting the value of the <code>spring.cloud.loadbalancer.cache.capacity</code> property.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default setup includes <code>ttl</code> set to 30 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
|
||||
<p>The default setup includes <code>ttl</code> set to 35 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>You can also altogether disable loadBalancer caching by setting the value of <code>spring.cloud.loadbalancer.cache.enabled</code>
|
||||
@@ -1631,7 +1631,7 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
|
||||
<div class="paragraph">
|
||||
<p>You could use this sample configuration to set it up:</p>
|
||||
</div>
|
||||
<div id="zoned-based-custom-loadbalancer-configuration" class="listingblock">
|
||||
<div id="health-check-based-custom-loadbalancer-configuration" class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public class CustomLoadBalancerConfiguration {
|
||||
|
||||
@@ -1641,7 +1641,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
|
||||
return ServiceInstanceListSupplier.builder()
|
||||
.withDiscoveryClient()
|
||||
.withHealthChecks()
|
||||
.withCaching()
|
||||
.build(context);
|
||||
}
|
||||
}</code></pre>
|
||||
@@ -1649,6 +1648,10 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">NOTE</dt>
|
||||
<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>
|
||||
<dt class="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>
|
||||
|
||||
Reference in New Issue
Block a user