You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass the `clusterConfigs` array when you create the `MultiClusterClientConfig` builder.
@@ -175,11 +184,11 @@ the circuit breaker:
175
184
| Builder method | Default value | Description|
176
185
| --- | --- | --- |
177
186
|`circuitBreakerSlidingWindowType()`|`COUNT_BASED`| Type of sliding window. `COUNT_BASED` uses a sliding window based on the number of calls, while `TIME_BASED` uses a sliding window based on time. |
178
-
|`circuitBreakerSlidingWindowSize()`|`100`| Size of the sliding window in number of calls or time in seconds, depending on the sliding window type. |
187
+
|`circuitBreakerSlidingWindowSize()`|`100`| Size of the sliding window (this is the number of calls for a `COUNT_BASED` window or time in seconds, for a `TIME_BASED`window). |
179
188
|`circuitBreakerSlidingWindowMinCalls()`|`10`| Minimum number of calls required (per sliding window period) before the circuit breaker will start calculating the error rate or slow call rate. |
180
189
|`circuitBreakerFailureRateThreshold()`|`50.0f`| Percentage of failures to trigger the circuit breaker. |
181
190
|`circuitBreakerSlowCallRateThreshold()`|`100.0f`| Percentage of slow calls to trigger the circuit breaker. |
182
-
|`circuitBreakerSlowCallDurationThreshold()`|`60000`| Duration in milliseconds to consider a call as slow. |
191
+
|`circuitBreakerSlowCallDurationThreshold()`|`60000`| Duration in milliseconds after which a call is considered slow. |
183
192
|`circuitBreakerIncludedExceptionList()`| See description |`List` of `Throwable` classes that should be considered as failures. By default, it includes just `JedisConnectionException`. |
184
193
|`circuitBreakerIgnoreExceptionList()`|`null`|`List` of `Throwable` classes that should be ignored for failure rate calculation. |
185
194
@@ -190,19 +199,19 @@ The `MultiClusterClientConfig` builder has the following options to configure re
190
199
| Builder method | Default value | Description|
191
200
| --- | --- | --- |
192
201
|`retryMaxAttempts()`|`3`| Maximum number of retry attempts (including the initial call). |
193
-
|`retryWaitDuration()`|`500`|Number of milliseconds to wait between retry attempts. |
194
-
|`retryWaitDurationExponentialBackoffMultiplier()`|`2`|[Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) factor multiplied against wait duration between retries. For example, with a wait duration of 1 second and a multiplier of 2, the retries would occur after 1s, 2s, 4s, 8s, 16s, and so on. |
202
+
|`retryWaitDuration()`|`500`|Initial number of milliseconds to wait between retry attempts. |
203
+
|`retryWaitDurationExponentialBackoffMultiplier()`|`2`|[Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) factor multiplied by the wait duration between retries. For example, with a wait duration of 1 second and a multiplier of 2, the retries would occur after 1s, 2s, 4s, 8s, 16s, and so on. |
195
204
|`retryIncludedExceptionList()`| See description |`List` of `Throwable` classes that should be considered as failures to be retried. By default, it includes just `JedisConnectionException`. |
196
205
|`retryIgnoreExceptionList()`|`null`|`List` of `Throwable` classes that should be ignored for retry. |
197
206
198
207
### Failover callbacks
199
208
200
209
You may want to take some custom action when a failover occurs.
201
-
For example, you may want to log a warning, increment a metric,
210
+
For example, you could log a warning, increment a metric,
202
211
or externally persist the cluster connection state.
203
212
204
213
You can provide a custom failover action using a class that
205
-
implements `java.util.function.Consumer`. You should place
214
+
implements `java.util.function.Consumer`. Place
206
215
the custom action in the `accept()` method, as shown in the example below.
207
216
208
217
```java
@@ -234,10 +243,8 @@ The `accept()` method is now called whenever a failover occurs.
234
243
235
244
## Health check configuration
236
245
237
-
The general strategy for health checks is to ask the Redis server for a
238
-
response that it could only give if it is healthy. There are several
239
-
specific strategies available for health checks that you can configure using the
240
-
`MultiClusterClientConfig` builder. The sections below explain these
246
+
There are several strategies available for health checks that you can configure using the
247
+
`MultiClusterClientConfig` builder. The sections below explain these strategies
0 commit comments