RedisLabs / redis-cluster-proxy

A proxy for Redis clusters.
GNU Affero General Public License v3.0
990 stars 129 forks source link

[kubernetes] When the redis cluster node ip changes, the proxy does not work properly #113

Closed GounGG closed 1 year ago

GounGG commented 1 year ago

I run both the cluster and the proxy in kubernetes, conduct a series of tests, and find that when the server pod is destroyed and rebuilt, the proxy cannot work normally, and the error message is:

[2023-01-16 03:30:10.956/0] Error writing request 0:1:2to cluster: No route to host
[2023-01-16 03:30:10.961/0] Error writing request 0:1:1to cluster: No route to host

If I don't want to restart the proxy, I just need to execute PROXY CLUSTER UPDATE, and the proxy will return to normal. I would like to ask if there are other automatic trigger conditions for this operation, such as:

gzwxh commented 1 year ago

可以尝试使用k8s内部域名进行访问集群 redis-cluster-0.redis-cluster.devops.svc.cluster.local:6379, redis-cluster-1.redis-cluster.devops.svc.cluster.local:6379, redis-cluster-2.redis-cluster.devops.svc.cluster.local:6379, redis-cluster-3.redis-cluster.devops.svc.cluster.local:6379, redis-cluster-4.redis-cluster.devops.svc.cluster.local:6379, redis-cluster-5.redis-cluster.devops.svc.cluster.local:6379

GounGG commented 1 year ago

already fix the issue,thank you.