redis / node-redis

Redis Node.js client
https://redis.js.org/
MIT License
16.96k stars 1.89k forks source link

Client fails to reconnect to redis cluster after version upgrade in kubernetes #2794

Open Mohana-Manikandan opened 4 months ago

Mohana-Manikandan commented 4 months ago

Description

We are using bitnami/redis-cluster, version 7.2.5-debian-12-r2, deployed in Kubernetes. All our micro-services connect to the Redis server using the following configuration:

this.redis = createCluster({
  rootNodes: [{ url: config.REDIS.URL }],
});

The URLs are configured using service names, such as redis://production-redis.databases.svc.cluster.local:6379.

We have noticed that whenever we perform a version upgrade of the deployed Redis, all our micro-services fail to reconnect to the newly deployed Redis with the error ECONNRESET.

A temporary workaround has been to restart the micro-services, which then successfully establish a connection to the cluster.

This behavior seems to be related to the issue described in go-redis.

I did go through the documentation but failed to find out a way to fix it.

Node.js Version

v20.14.0

Redis Server Version

7.2.5

Node Redis Version

4.6.15

Platform

Linux

Logs

No response

melissawahnish commented 4 months ago

We experienced the same issue on Heroku. We saw this error message: Error accepting a client connection: (null)

We fixed the issue by reverting the upgrade.