Advertisement
Advanced Redis, Clustering

What is a split brain scenario in the context of Redis Cluster, and how does the cluster protect against it?

Short answer

A split brain scenario happens when a network partition causes part of the cluster to lose contact with the rest, potentially leading to two different nodes both believing they are the legitimate master for the same hash slots, and Redis Cluster protects against this by…

Save Redis mock interview
Advertisement
AModel answer
A split brain scenario happens when a network partition causes part of the cluster to lose contact with the rest, potentially leading to two different nodes both believing they are the legitimate master for the same hash slots, and Redis Cluster protects against this by requiring a majority of master nodes to agree before promoting a replica, refusing to serve writes on a minority side of the partition.
Example

-- A cluster requires a majority of masters to be reachable -- to accept new writes, protecting data consistency redis-cli cluster info

Real-world example
A cluster experiencing a temporary network split between two data centers automatically stops accepting writes on the minority side, preventing conflicting data changes from happening independently on both sides of the partition.
Likely follow-ups
  • What happens to write requests sent to the minority side during a network partition?
  • How do you configure the cluster's behavior for handling this kind of partition?
Related topics