joaojeronimo / node_redis_cluster

A thin wrapper over node_redis to make it work with Redis Cluster
53 stars 17 forks source link

Global redisLinks #15

Open tleef opened 9 years ago

tleef commented 9 years ago

Referring to the redisLinks property that is exposed through module.exports https://github.com/joaojeronimo/node_redis_cluster/blob/master/index.js#L317

In a project where there are multiple redis clusters being used, the redisLinks property will point to the nodes of the most recently created client. Given that a client can be created either by a user or by receiving a 'MOVED' command, there is almost no way of reliably determining what redisLinks is pointing to. Unless there is a really good reason for keeping redisLinks around, I am in favor of removing it from the API altogether.