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
Turn memcached circuit-breaker on by default (#3189) (#3190)
* Turn memcached circuit-breaker on by default
Will trip after 10 failures within 10 seconds
Signed-off-by: Bryan Boreham <[email protected]>
* Change circuit-breaker log fields to avoid clash
The names 'from' and 'to' are used elsewhere as dates, so avoid re-using them here as strings
Signed-off-by: Bryan Boreham <[email protected]>
* Update CHANGELOG
Signed-off-by: Bryan Boreham <[email protected]>
* Updated doc
Signed-off-by: Marco Pracucci <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>
Co-authored-by: Bryan Boreham <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@
50
50
*[ENHANCEMENT] Add "integration" as a label for `cortex_alertmanager_notifications_total` and `cortex_alertmanager_notifications_failed_total` metrics. #3056
51
51
*[ENHANCEMENT] Add `cortex_ruler_config_last_reload_successful` and `cortex_ruler_config_last_reload_successful_seconds` to check status of users rule manager. #3056
52
52
*[ENHANCEMENT] The configuration validation now fails if an empty YAML node has been set for a root YAML config property. #3080
53
-
*[ENHANCEMENT] Memcached dial() calls now have an optional circuit-breaker to avoid hammering a broken cache #3051
53
+
*[ENHANCEMENT] Memcached dial() calls now have a circuit-breaker to avoid hammering a broken cache.#3051, #3189
54
54
*[ENHANCEMENT]`-ruler.evaluation-delay-duration` is now overridable as a per-tenant limit, `ruler_evaluation_delay_duration`. #3098
55
55
*[ENHANCEMENT] Add TLS support to etcd client. #3102
56
56
*[ENHANCEMENT] When a tenant accesses the Alertmanager UI or its API, if we have valid `-alertmanager.configs.fallback` we'll use that to start the manager and avoid failing the request. #3073
Copy file name to clipboardExpand all lines: pkg/chunk/cache/memcached_client.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ func (cfg *MemcachedClientConfig) RegisterFlagsWithPrefix(prefix, description st
83
83
f.DurationVar(&cfg.Timeout, prefix+"memcached.timeout", 100*time.Millisecond, description+"Maximum time to wait before giving up on memcached requests.")
84
84
f.DurationVar(&cfg.UpdateInterval, prefix+"memcached.update-interval", 1*time.Minute, description+"Period with which to poll DNS for memcache servers.")
85
85
f.BoolVar(&cfg.ConsistentHash, prefix+"memcached.consistent-hash", true, description+"Use consistent hashing to distribute to memcache servers.")
86
-
f.UintVar(&cfg.CBFailures, prefix+"memcached.circuit-breaker-consecutive-failures", 0, description+"Trip circuit-breaker after this number of consecutive dial failures (if zero then circuit-breaker is disabled).")
86
+
f.UintVar(&cfg.CBFailures, prefix+"memcached.circuit-breaker-consecutive-failures", 10, description+"Trip circuit-breaker after this number of consecutive dial failures (if zero then circuit-breaker is disabled).")
87
87
f.DurationVar(&cfg.CBTimeout, prefix+"memcached.circuit-breaker-timeout", 10*time.Second, description+"Duration circuit-breaker remains open after tripping (if zero then 60 seconds is used).")
88
88
f.DurationVar(&cfg.CBInterval, prefix+"memcached.circuit-breaker-interval", 10*time.Second, description+"Reset circuit-breaker counts after this long (if zero then never reset).")
89
89
}
@@ -147,7 +147,7 @@ func NewMemcachedClient(cfg MemcachedClientConfig, name string, r prometheus.Reg
147
147
}
148
148
149
149
func (c*memcachedClient) circuitBreakerStateChange(namestring, from gobreaker.State, to gobreaker.State) {
150
-
level.Info(c.logger).Log("msg", "circuit-breaker state change", "name", name, "from", from, "to", to)
150
+
level.Info(c.logger).Log("msg", "circuit-breaker state change", "name", name, "from-state", from, "to-state", to)
0 commit comments