Sentinel or Master by ip/port only

18 views
Skip to first unread message

Sergey Sudakovich

unread,
Feb 14, 2017, 5:26:39 PM2/14/17
to Redis DB
If I have only an ip/port only, what is the most reliable way to tell if I am connected to a master or a sentinel?
One approach is to call INFO and check the 'role', but there is no 'role' when I am connecting to a sentinel. Anybody can suggest a more elegant way?

Tuco

unread,
Feb 15, 2017, 12:15:30 AM2/15/17
to Redis DB
When you do "info", there is something called "redis_mode" which is "sentinel" if you are connected to sentinel and has other values otherwise.
Reply all
Reply to author
Forward
0 new messages