Server Role
# Redis Role Command
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0))
Redis Tutorial
(#)(#)(#)(#)(#)
## Redis Commands
(#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#)
## Redis Advanced Tutorial
(#)(#)(#)(#)(#)(#)(#)(#)
[](#)(#)
(#)[](#)
Deep Dive
Computer
Data Management
Programming
Scripting Languages
Computer Hardware
Scripts
Networking
Computer Servers
Web Design & Development
Web Services
# Redis Role Command
!(#)(#)
The Redis Role command retrieves the role of a master or slave instance. Possible 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 Versions
>= 2.8.12
### Return Value
Returns an array: the first element is one of "master", "slave", or "sentinel".
### Example
redis 127.0.0.1:6379> ROLE 1) "master"2) (integer) 03) (empty list or set) redis>
!(#)(#)
YouTip