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 :
- “slave” – Indicates that the cli is connected to slave
- “Localhost” hostname
- 6379 – port number
- “connected” – All good
- disconnected – Not connected
- sync – sync is in progress
- connecting – connection establishment in progress
- 22696 – Offset of slave (Acknowledgement of replication offset data received)