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
When you use the `UnifiedJedis` instance, Jedis will handle the connection
167
+
management and failover transparently.
168
+
169
+
### Circuit breaker configuration
170
+
171
+
The `MultiClusterClientConfig` builder lets you pass several options to configure
172
+
the circuit breaker:
173
+
174
+
| Builder method | Default value | Description|
175
+
| --- | --- | --- |
176
+
|`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. |
177
+
|`circuitBreakerSlidingWindowSize()`|`100`| Size of the sliding window in number of calls or time in seconds, depending on the sliding window type. |
178
+
|`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. |
179
+
|`circuitBreakerFailureRateThreshold()`|`50.0f`| Percentage of failures to trigger the circuit breaker. |
180
+
|`circuitBreakerSlowCallRateThreshold()`|`100.0f`| Percentage of slow calls to trigger the circuit breaker. |
181
+
|`circuitBreakerSlowCallDurationThreshold()`|`60000`| Duration in milliseconds to consider a call as slow. |
182
+
|`circuitBreakerIncludedExceptionList()`| See description |`List` of `Throwable` classes that should be considered as failures. By default, it includes just `JedisConnectionException`. |
183
+
|`circuitBreakerIgnoreExceptionList()`|`null`|`List` of `Throwable` classes that should be ignored for failure rate calculation. |
184
+
185
+
### Retry configuration
186
+
187
+
The `MultiClusterClientConfig` builder has the following options to configure retries:
188
+
189
+
| Builder method | Default value | Description|
190
+
| --- | --- | --- |
191
+
|`retryMaxAttempts()`|`3`| Maximum number of retry attempts (including the initial call). |
192
+
|`retryWaitDuration()`|`500`| Number of milliseconds to wait between retry attempts. |
193
+
|`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. |
194
+
|`retryIncludedExceptionList()`| See description |`List` of `Throwable` classes that should be considered as failures to be retried. By default, it includes just `JedisConnectionException`. |
195
+
|`retryIgnoreExceptionList()`|`null`|`List` of `Throwable` classes that should be ignored for retry. |
196
+
197
+
### Health check configuration
198
+
199
+
The general strategy for health checks is to ask the Redis server for a
200
+
response that it could only give if it is healthy.
0 commit comments