L
L
lev1l2021-07-13 08:15:49
Redis
lev1l, 2021-07-13 08:15:49

How to count all master in radish cluster?

Hello. There is a redis cluster of several servers (5).

The problem is this: the master and slave between two servers periodically change places. The customer needs to monitor / counter the total number of masters in the cluster.

Deploy Sentinel - hemorrhoids and crutches.

Any thoughts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-13
@lev1l

For example, a script that will run
redis-cli info replication
for each node
AND will parse the response

# Replication

role:master

How many responses contain role:master, so many masters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question