-
Notifications
You must be signed in to change notification settings - Fork 31
Description
This is a recurring issue, previously reported in this GitHub issue.
I encountered the same problem while testing a Valkey Cluster on Kubernetes. When a Valkey Cluster pod is evicted, my client attempts to reconnect immediately, but gets stuck in the SYN_SENT state indefinitely, trying to connect to an IP address that no longer exists in the Kubernetes cluster. In Kubernetes, pods are ephemeral, and each new pod is assigned a new IP address.
From the ValkeyCluster documentation, it's not immediately clear that developers need to configure the TCP timeout. See the relevant section here. Furthermore, I don’t believe developers building applications that connect to Valkey should have to handle low-level TCP parameters.
Proposed solutions:
-
Set a default
socket_timeoutvalue- Pros: This would solve the problem immediately.
- Cons: It may be difficult to choose a default value that fits all scenarios. For example, what would be a reasonable default value for Valkey traffic? Perhaps 2 seconds?
-
Make
socket_timeouta mandatory parameter- Pros: Avoids the need to guess a suitable default value.
- Cons: This would introduce a breaking change.