Redis Role command (for replication)

When you execute role command on master, below is the output :

1 ) “master” – Indicates that the cli is connected to is a master

2) (integer) 21589 – Offset of master

3) 1) – Indicates that only 1 replica / slave exist for the master

3) 1) 1) “127.0.0.1” – Hostname of slave

2) “6380” – Port Number of slave

3) “21589” – Offset of slave (Acknowledgement of replication offset data received)

When you execute role command on slave, below is the output :

  1. “slave” – Indicates that the cli is connected to slave
  2. “Localhost” hostname
  3. 6379 – port number
  4. “connected” – All good
    • disconnected – Not connected
    • sync – sync is in progress
    • connecting – connection establishment in progress
  5. 22696 – Offset of slave (Acknowledgement of replication offset data received)

Leave a Comment