RRM
RRM

Reputation: 2660

Redis HA what happens if Master stops and restarted

In a Redis HA setup, with 1 master and 5 replicas: Let's suppose the master goes down. Then the Sentinels would elect a replica as the next master.

What happens when the original master is restarted with its config? Would it be joining as a master or as a replica? I suppose, since it is not configured as a replica, so it should not be running as a replica.

Upvotes: 0

Views: 244

Answers (2)

user17416254
user17416254

Reputation:

Master would join as a replica.

...The master will then demote itself to a replica... https://redis.io/commands/failover

Upvotes: 1

for_stack
for_stack

Reputation: 22886

When the original master is down and a new master is elected. The original master will be added as a virtual replica of the new master. When it recovers, original master will be set to be a replica of the new master automatically.

Upvotes: 1

Related Questions