Feature Request: Add Automatic ForceReconnect Recovery for Persistent ConnectionMultiplexer Connection Failures
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C#
- Sterne
- 6.2k
- Forks
- 1.6k
- Ø Merge
- 9 Std. 42 Min.
- Gemergte PRs (30 T.)
- 51
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus StackExchange/StackExchange.Redis
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
StackExchange/StackExchange.Redis#3249 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
HotKeysClusterTests.CanUseClusterFilter skips intermittently, hiding the assertions it exists forOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
StackExchange/StackExchange.Redis#3239 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Duplicate Pub/Sub messages after Redis Sentinel failoverEvtl. vergeben @vkyow hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
StackExchange/StackExchange.Redis#3336 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 1-2 Tage Anfängerfreundlichkeit 8/100
StackExchange/StackExchange.Redis#3326 · 4 Kommentare · 39 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
StackExchange/StackExchange.Redis#3240 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in StackExchange/StackExchange.Redis
Ähnliche Issues
-
Playground selection bar: comes back after Apply or scrolling while focus is in the Markdown paneOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
sillsdev/SIL.TextEditing#175 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs attention untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3666 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
MicrosoftLearning/eShopOnWeb#466 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
stryker-mutator/stryker-net#3974 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag