Cluster, Persistence & Stack

Preview — 3 of 10 questions

How are keys distributed across nodes in Redis Cluster, and what is a MOVED redirection?

AKeys are distributed alphabetically across nodes; MOVED errors occur when a node is overloaded
BKeys are distributed by value size; MOVED redirections happen during replication lag
CRedis Cluster uses 16,384 hash slots; each key is assigned to a slot via CRC16(key) % 16384; if a client sends a command to a node that doesn't own the slot, it receives a MOVED slotNum ip:port response directing it to the correct node
DHash slots are assigned dynamically per request; MOVED errors indicate slot collision

What is the purpose of the quorum in Redis Sentinel?

AQuorum is the maximum number of replicas that can lag behind the primary
BQuorum limits the number of concurrent connections to the primary
CQuorum is the minimum number of Sentinel instances that must agree a primary is down before initiating automatic failover — this prevents split-brain scenarios where network partitions cause a false positive
DQuorum is a configuration for how many replicas must acknowledge a write before it's confirmed

What does BGSAVE do in Redis and what is the fork-on-save mechanism?

ABGSAVE synchronously saves all data to disk, blocking all Redis commands during the write
BBGSAVE is a cluster command that saves data from all nodes simultaneously
CBGSAVE triggers incremental saves of only recently modified keys
DBGSAVE forks a child process that takes a point-in-time snapshot of all data and writes it to an RDB file in the background; the parent process continues serving commands using copy-on-write memory semantics

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.