Failover config
Failover configuration is used to configure the failover behavior of the system. The failover configuration is defined by the following properties:
retry_policy
The retry_policy: section contains the configuration for the retry policy. The retry policy is used to configure the number of attempts and the time limit for the retry. The following properties are supported:
max_attempts: The maximum number of attempts to retry the request.time_limit_seconds: The time limit in seconds to wait until next retry attempts when the max attempts are reached.
circuit_breaker
Configuration for the circuit breaker. The circuit breaker is used to prevent the system from making requests to the failing service. The following properties are supported:
failure_threshold: The number of consecutive failures that trigger the circuit breaker.success_threshold: The number of consecutive successes that reset the circuit breaker.half_open_delay_in_secs: The time in seconds to wait before the circuit breaker transitions to the half-open when the circuit breaker is open.failure_counter_reset_in_secs: The time in seconds to reset the failure counter.
You can learn more about the circuit breaker pattern here.
Example of failover configuration file: