Prev Next

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.

Configuring min-replicas-to-write helps prevent split-brain writes by...
After a network partition heals, the old isolated primary should...

More Related questions...

What is Valkey? What is the purpose of Valkey? What are the data types supported by Valkey? How do you install Valkey on a Linux server? Define Valkey persistence? What is RDB persistence in Valkey? What is AOF persistence in Valkey? Describe Valkey replication? List the eviction policies supported by Valkey? What is the purpose of Valkey Sentinel? What is Valkey Cluster? How do you apply a TTL to a key in Valkey? What is the purpose of the valkey.conf configuration file? How do you use the Valkey CLI to connect to a remote, password-protected server? Explain the basic architecture of a Valkey server? Why was Valkey created? Why do we use Valkey instead of Redis? What is the difference between Valkey and Redis? How does Valkey Cluster achieve horizontal scaling through hash slots? How does Valkey handle automatic failover in Sentinel mode? When should you choose Valkey Cluster over Sentinel? What is the difference between RDB and AOF persistence? How can you optimize memory usage in Valkey? How do you troubleshoot high latency in a Valkey deployment? Explain the lifecycle of a command from a Valkey client to execution and response? Explain the execution flow of primary-replica replication in Valkey? Explain the internal working of the Valkey single-threaded event loop? Why doesn't Valkey execute commands using multiple threads by default? What happens when a primary node fails in a Valkey Cluster? Which is better and why: Valkey Cluster or client-side sharding? How does Valkey implement publish/subscribe messaging? What is the difference between LPUSH and RPUSH? How do you use Valkey Streams for event processing? What are Valkey modules and how do you load one? How does Valkey handle expired key deletion internally? What is the difference between Valkey and Memcached? How do you secure a Valkey deployment in production? What is the role of ACLs in Valkey? How does Valkey handle memory fragmentation? What is the difference between WAIT and replica acknowledgment in Valkey? How do you perform a zero-downtime Valkey version upgrade? Explain the internal working of Valkey's hash slot mechanism in cluster mode? How do you troubleshoot a split-brain scenario with Valkey Sentinel? Explain the difference between Valkey Cluster mode and standalone mode? How does Valkey achieve high availability? What is the difference between synchronous and asynchronous replication in Valkey? How do you monitor Valkey performance in production? Explain the internal working of Valkey's LRU and LFU eviction algorithms? Why should you avoid running the KEYS command in production? How does Valkey's multi-threaded I/O model improve throughput over classic single-threading?
Show more question and Answers...


Comments & Discussions