Redis Role Command
The Redis Role command shows the role of the master or replica instance; the roles are master, slave, and sentinel.
Syntax
The basic syntax of the redis Role command is as follows:
redis 127.0.0.1:6379> ROLE
Available Version
= 2.8.12
Return Value
Returns an array: the first parameter is one of master, slave, and sentinel.
Example
redis 127.0.0.1:6379> ROLE
1) "master"
2) (integer) 0
3) (empty list or set)
redis>