eleme / corvus

A fast and lightweight Redis Cluster Proxy for Redis 3.0
MIT License
789 stars 143 forks source link

Replace `CLUSTER SLOTS` with `CLUSTER NODES` to get slot map #64

Closed maralla closed 8 years ago

jasonjoo2010 commented 8 years ago

hi, maralla

why we considered to replace it?

the output of slots command is structured while nodes' is unsure and is mainly for reading i think. if the slots is fully distributed it is not sure whether nodes command is reliable.

eg.: master - 0 1464406084408 14 connected 1,3,4,5,6,8192-12287,13223

is it for network transfer reasons?

maralla commented 8 years ago

CLUSTER SLOTS is much slower than CLUSTER NODES in large clusters with many discrete slots.

jasonjoo2010 commented 8 years ago

yeah got it it is suggested add fully test case which has many seperated slots associated.

wooparadog commented 8 years ago

@jasonjoo2010 Another user has reported that because redis 3.2.0 changed the return value of cluster slots, corvus@0.2.3 is not able to update its slot information. So using cluster nodes fixed that as a bonus...