Redis – Server Cluster Slots Command

  • Post author:
  • Post category:Redis
  • Post comments:0 Comments

Redis CLUSTER SLOTS returns an array reply of the current cluster state.

Return Value

Array reply – Nested list of slot ranges with IP/Port mappings.

Syntax

Following is the basic syntax of Redis CLUSTER SLOTS command.

redis 127.0.0.1:6379> CLUSTER SLOTS

Sample reply

redis 127.0.0.1:6379> CLIENT SETNAME "my connection"  
1) 1) (integer) 0 
2) (integer) 4095 
   3) 1) "127.0.0.1" 
      2) (integer) 7000 
   4) 1) "127.0.0.1" 
      2) (integer) 7004 
2) 1) (integer) 12288 
   2) (integer) 16383 
   3) 1) "127.0.0.1" 
      2) (integer) 7003 
   4) 1) "127.0.0.1" 
      2) (integer) 7007 
3) 1) (integer) 4096 
   2) (integer) 8191 
   3) 1) "127.0.0.1" 
      2) (integer) 7001 
   4) 1) "127.0.0.1" 
      2) (integer) 7005 
4) 1) (integer) 8192 
   2) (integer) 12287 
   3) 1) "127.0.0.1" 
      2) (integer) 7002 
   4) 1) "127.0.0.1" 
      2) (integer) 7006 

Leave a Reply