config.io_helidon_faulttolerance_CircuitBreaker.adoc Maven / Gradle / Ivy
///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
///////////////////////////////////////////////////////////////////////////////
ifndef::rootdir[:rootdir: {docdir}/..]
:description: Configuration of io.helidon.faulttolerance.CircuitBreaker
:keywords: helidon, config, io.helidon.faulttolerance.CircuitBreaker
:basic-table-intro: The table below lists the configuration keys that configure io.helidon.faulttolerance.CircuitBreaker
include::{rootdir}/includes/attributes.adoc[]
= CircuitBreaker (faulttolerance) Configuration
// tag::config[]
Type: link:{javadoc-base-url}/io.helidon.faulttolerance/io/helidon/faulttolerance/CircuitBreaker.html[io.helidon.faulttolerance.CircuitBreaker]
This is a standalone configuration type, prefix from configuration root: `fault-tolerance.circuit-breakers`
== Configuration options
.Optional configuration options
[cols="3,3a,2,5a"]
|===
|key |type |default value |description
|`delay` |Duration |`PT5S` |How long to wait before transitioning from open to half-open state.
@return delay
|`error-ratio` |int |`60` |How many failures out of 100 will trigger the circuit to open.
This is adapted to the #volume() used to handle the window of requests.
If errorRatio is 40, and volume is 10, 4 failed requests will open the circuit.
Default is `DEFAULT_ERROR_RATIO`.
@return percent of failure that trigger the circuit to open
@see #volume()
|`success-threshold` |int |`1` |How many successful calls will close a half-open circuit.
Nevertheless, the first failed call will open the circuit again.
Default is `DEFAULT_SUCCESS_THRESHOLD`.
@return number of calls
|`volume` |int |`10` |Rolling window size used to calculate ratio of failed requests.
Default is `DEFAULT_VOLUME`.
@return how big a window is used to calculate error errorRatio
@see #errorRatio()
|===
// end::config[]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy