Feature Request: Add Automatic ForceReconnect Recovery for Persistent ConnectionMultiplexer Connection Failures
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
Direzione di ricerca
Start by reading ConfigurationOptions and the ConnectionMultiplexer reconnection and retry behavior, then review the six issue comments for implementation guidance or unresolved concerns. The issue proposes configurable automatic ForceReconnect recovery after persistent connection failures, with thresholds and limits; done means the recovery behavior and configuration are defined and work as described without forcing reconnects for transient errors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
StackExchange.Redis normally handles connection recovery automatically through ConnectionMultiplexer. However, there are scenarios where an application may continue experiencing connection failures after a connectivity disruption, and normal reconnection and recovery mechanisms may not restore healthy connectivity.
Microsoft documents the ForceReconnect pattern as an additional recovery mechanism for these scenarios.
https://learn.microsoft.com/en-us/azure/redis/best-practices-connection#using-forcereconnect-with-stackexchangeredis
Today application using Stackexchange.Redis directly must implement this additional ForceReconnect recovery logic themselves.
Proposal
Consider adding a guarded automatic recovery mechanism to StackExchange.Redis for persistent connection-level failures.
The intent is not to force reconnection for every RedisTimeoutException or transient connection error. The existing ConnectionMultiplexer reconnection and retry mechanisms should remain the first line of recovery.
Only when connection failures persist beyond a configurable threshold should the library consider triggering stronger ForceReconnect recovery.
Suggested API Changes
Consider extending ConfigurationOptions with the following properties to configure automatic recovery from persistent connection failures.
bool AutoForceReconnect // default True
public TimeSpan AutoForceReconnectErrorThreshold { get; set; } // default 30s
public TimeSpan AutoForceReconnectMinInterval //default 60s
public TimeSpan AutoForceReconnectMaxDuration //default 5 mins
example Usage
`var options = ConfigurationOptions.Parse(
"localhost:6379");
options.AutoForceReconnect = true;
options.AutoForceReconnectErrorThreshold = TimeSpan.FromSeconds(30);
options.AutoForceReconnectMinInterval = TimeSpan.FromSeconds(60);
options.AutoForceReconnectMaxDuration = TimeSpan.FromMinutes(5);
var redis = await ConnectionMultiplexer.ConnectAsync(options);`
Configuration
AutoForceReconnect: Enables or disables automatic forced recovery. Defaults to true
AutoForceReconnectErrorThreshold: The duration of persistent connection-level failures required before forced recovery is considered.
AutoForceReconnectMinInterval: The minimum interval between forced recovery attempts to prevent excessive connection recycling.
AutoForceReconnectMaxDuration: The maximum duration for which automatic recovery attempts may continue during a persistent connectivity issue.
- Lingua principale
- C#
- Stelle
- 6.2k
- Fork
- 1.6k
- Merge medio
- 9h 42m
- PR unite (30g)
- 51
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di StackExchange/StackExchange.Redis
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
StackExchange/StackExchange.Redis#3249 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
HotKeysClusterTests.CanUseClusterFilter skips intermittently, hiding the assertions it exists forAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
StackExchange/StackExchange.Redis#3239 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 8/100
StackExchange/StackExchange.Redis#3326 · 4 commenti · 39 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
StackExchange/StackExchange.Redis#3240 ·
I maintainer di solito rispondono entro 1 giorno
-
RedisValue equality treats "1,000", "(5)" and " 5 " as numbers, via NumberStyles.AnyForse già presa @banlor l’ha presa 42 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
StackExchange/StackExchange.Redis#3233 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di StackExchange/StackExchange.Redis
Issue simili
-
The Recommended preset turns on Import Uno DSP, which only works with the Material themeForse già presa @agneszitte l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
unoplatform/uno.templates#2388 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
eyalgolan/statecraft-israel#2732 ·
I maintainer di solito rispondono entro 1 giorno
-
変換の候補のどれが Zenzai の答えか分からないAperta要トリアージ
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
kind/chore status/draft
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Altinn/altinn-events#1158 ·
I maintainer di solito rispondono entro 1 giorno
-
S: Untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Trauma-Station/Trauma-Station#5285 ·
I maintainer di solito rispondono entro 1 giorno