ledgetech / lua-resty-redis-connector

Connection utilities for lua-resty-redis
234 stars 71 forks source link

What is the current status of the connector? #5

Closed gregkare closed 8 years ago

gregkare commented 8 years ago

Hi, thanks for working on this.

Does "Redis Cluster support." under TODO in the README mean that it cannot be used to do queries yet? There's no example in the README.

Thanks in advance

pintsized commented 8 years ago

Hi,

The connector is used in production in several places, so current status is that you can definitely rely upon it, and its ongoing maintenance. I left a space for eventually having Redis Cluster support, but for this to work we need a Redis client which supports cluster (or potentially a separate module which composes the Redis client in some way). See here: https://github.com/openresty/lua-resty-redis/issues/43

gregkare commented 8 years ago

I think I'm missing something. Does that mean that connecting to sentinel (as in the README) currently is not supported because the lua-resty-redis library doesn't have cluster support?

pintsized commented 8 years ago

No, it means you need to understand the difference between Sentinel and Cluster better :)

http://redis.io/topics/sentinel http://redis.io/topics/cluster-tutorial

Sentinel works just fine, and is proven in production. Cluster is a newer thing for Redis (although uses and is related to Sentinel), and requires quite a bit of effort on the part of the client, so all Redis clients will have to implement that logic in some way. The lua-resty-redis client has not yet gained this functionality officially, although some people have had a crack at it I believe.

When lua-resty-redis (or another module) can utilise Redis Cluster, then I'll add support for it to the lua-resty-redis-connector, who's job is merely to make connection logic reliable and repeatable.

gregkare commented 8 years ago

Thanks, for the clarification! I was under the impression that "cluster" and "sentinel" were the same thing

gregkare commented 8 years ago

I forgot to close this