Home > Back-end >  Redis sentry outage restart..
Redis sentry outage restart..

Time:02-01

Recently took over redis deployment environment, a research firm, found that using mode of master-slave + sentry,

Only three machines, a machine a master from a sentry, b and c are two machines from a sentry,

Outage experiment, I take the master node to stop a machine, check the configuration, found that b machine from nodes to the master node, then I put a machine master node restart it automatically become a slave node, this is normal, the sentinel pattern may play a role,

Then I put the master node b machine and the guard all stopped, equivalent to b machine is down, this time to see a and c two machines configuration redis and sentry, found a machine from a node into the master node, c machine slaveof also points to a new master node, the sentinel configuration, too, no problem, that the master node outage will not affect the redis service switching,

Finally, the problems come, I put b machine redis and sentry after the restart, and then go to the configuration, found three machines redis configuration all off, a machine from another node slaveof pointing to his own master node, but point to from node b, c and b to c, sentry configuration is also disorderly, if not sure which one is the master node,

At that moment, I to stop all of my b machine redis and sentry, configuration, and see a and c, found again good, all point to a machine from a node (new master node), and then I restart again b machine redis and sentry, found again disorderly,

Finally, I have to stop machine service b, then a and c configuration such as to determine which one is the master node, manual to modify the b machine redis and sentinel configuration, pointing to the new master node, and restart again, then there would be no change configuration, everything is OK,

Above tests made me feel sentry mode will make the configuration of uncontrolled, or configuration has a problem, I also hope to have experience of a friend to give directions,

CodePudding user response:

So to solve
  • Related