~learn.
0:00 / 1:16
W05 · Consistency and coordination

One Sentinel says the Redis master is dead. Nothing happens. Good.

transcript

A Redis Sentinel can't reach the master. It's sure the master is dead. And nothing happens. That's the system working.

One observer can't tell two things apart. A dead master. Or its own network problem. Maybe only its link to the master is down. Everyone else can still see the master. Fail over now, and you get two masters.

Typically 3 or more Sentinels watch the master. One can't reach it. That's only subjectively down. One opinion. It asks the others. Only when a quorum agrees is it objectively down. Then the Sentinels elect a leader among themselves. By majority vote. That leader promotes the best replica. Priority, then replication offset.

The configuration epoch increases. The newer epoch wins. But here's the catch. That epoch fences configuration. Not data. A returning old master can still accept writes until it's reconfigured. Min replicas to write bounds that window.

No heartbeat from the leader? That's an opinion, not a fact. Ask the others. Fail over only when a quorum agrees it's dead.

Full breakdown in the lecture.