Circuit Breaker Config
data class CircuitBreakerConfig(val failureThreshold: Int = 5, val recoveryTimeoutMs: Long = 60000, val successThreshold: Int = 2)
Configuration for circuit breaker behavior.
Circuit breakers help prevent cascading failures by temporarily stopping execution of tools that are consistently failing. This reduces load on failing systems and provides faster failure responses.
States:
CLOSED: Normal operation, requests pass through
OPEN: Fast-failing, requests are rejected immediately
HALF_OPEN: Testing recovery, limited requests pass through
Parameters
failure Threshold
Number of failures before opening the circuit (default: 5)
recovery Timeout Ms
Time in milliseconds before testing recovery (default: 60000ms)
success Threshold
Number of successes needed to close the circuit (default: 2)