StackExchange / StackExchange/StackExchange.Redis

Redis in Cluster Mode, Getting SocketClosed message when Master goes down

Open
#2,409 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

⚙️ area:cluster
Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Hello,
We are running Redis in cluster mode with 3 Masters and 3 Slaves. We have a long running client that keeps reading/writing to the Redis through the StackExchange.Redis library (2.6.70)
When we tested with taking 1 master down, we noticed that the corresponding slave got promoted to being the Master in about a few seconds (confirmed using the redis cli). But, the long running client got no response from the SE.Redis and then the SE.Redis call from my client failed with a timeout.
Does the StackExchange.Redis library provide some sort of retry mechanism with some wait if the current Master goes down?
Are there any exceptions we can catch from the client side so that we can retry? Any help is appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names StackExchange.Redis 2.6.70 and Redis cluster mode but no repository files, tests, or entry points. Reproduce the three-master/three-slave failover described, then trace the client’s timeout and retry or exception behavior; done means the failover outcome and supported retry behavior are confirmed or a targeted regression is captured.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, redis
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.