From 1e07c4b00f5eb251cc9aebc92b12885782679fd5 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Thu, 26 Nov 2026 04:15:54 +0000 Subject: [PATCH] docs(shared-state): describe the trip rule and the backoff reset --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1ced9f..9a8e647 100644 --- a/README.md +++ b/README.md @@ -738,7 +738,7 @@ Traefik calls `New()` once per route and runs several pods. Without `redis.share How it works: -- A breaker counts consecutive failures across all replicas. A success on any replica resets the count and closes an open breaker. The replica whose flush takes the count from below the threshold to the threshold or above opens the breaker for all replicas. Open times and thresholds are the local ones: 3 failures and 30 seconds, doubling to 5 minutes, for the request breaker; the `breaker` block for the discovery breaker; 3 failures and 30 seconds for the decision breaker. +- A breaker counts consecutive failures across all replicas. A success on any replica resets the count and closes an open breaker. A replica whose flush leaves the count at or above the threshold opens the breaker for all replicas, unless its last refresh already shows the breaker open. Two replicas can then open it at nearly the same time. A success also resets the doubling of the open time. Open times and thresholds are the local ones: 3 failures and 30 seconds, doubling to 5 minutes, for the request breaker; the `breaker` block for the discovery breaker; 3 failures and 30 seconds for the decision breaker. - A breaker reads as open when its local breaker or the shared breaker is open. - With `redis.sharedState` on, the discovery `breaker.failureThreshold` counts failed refreshes across every route instance of every replica, not consecutive failures on one instance. Each instance runs its own discovery loop and adds each failed refresh to the shared count. Any success on any instance resets the count. The count also expires after twice `breaker.maxOpenDuration`. With the default threshold of `3` and several instances, a single round of failed refreshes can open the shared breaker. Raise `failureThreshold` for a large fleet. The local breaker of each instance still counts consecutive failures on that instance. - In-flight load is the larger of the local count and the shared count. The read window is the longest request timeout in 5 minute epochs, plus one epoch. A request stops counting when its start epoch leaves the window. A request timeout is progress-based: a stream that keeps sending data can run longer than the timeout. Such a stream drops out of the shared count when the window passes, so the shared count can be too low for long streams. It is never too high because of them.