Database / ValKey Interview questions
How do you troubleshoot a split-brain scenario with Valkey Sentinel?
Split-brain risk comes from network partitions where an isolated old primary keeps accepting writes while Sentinels on the majority side of the partition promote a replica to a new primary.
Setting min-replicas-to-write and min-replicas-max-lag mitigates this by making the isolated primary refuse writes once it can no longer see enough healthy, up-to-date replicas, rather than letting it keep diverging silently.
When diagnosing an incident, review Sentinel logs for the +sdown/+odown/+switch-master event sequence against your network topology, and once the partition heals, the old primary should demote and resynchronize as a replica of the new one; any writes it accepted during isolation aren't automatically merged and may need manual reconciliation.
More Related questions...