Redis hard
The `WAIT` command blocks until a write is acknowledged by N replicas. Does this mechanism strictly guarantee Linearizability (Strong Consistency)?
- A Yes, it transforms Redis into a strictly CP system that adheres to formal sequential consistency standards.
- B No; `WAIT` improves the probability of durability but does not prevent inconsistencies during 'Split Brain' network partitions.
- C Only if the instance is configured with the 'Strict AOF' flag to ensure every write is flushed before acknowledgement.
- D Yes, but only within a native Redis Cluster environment that uses the RAFT consensus protocol for the data path.
Answer: B. No; `WAIT` improves the probability of durability but does not prevent inconsistencies during 'Split Brain' network partitions.
Redis is not a consensus system like Etcd. If a Master thinks it is still Master but is partitioned away, it might acknowledge a `WAIT` command. Later, when a new Master is elected, the old Master's 'successful' write could be overwritten.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- If the Redis memory limit is reached, what specific behavior is exhibited by the `allkeys-lru` eviction policy?
- What is the defining characteristic of a Redis 'Set' data type compared to a standard Redis 'List'?
- In the context of Redis messaging, what is the functional definition of the 'Pub/Sub' feature?
- How does the Redis background snapshotting process (`BGSAVE`) leverage the operating system's `fork()` mechanism to minimize memory overhead?
- Why does Redis proactively disconnect a Pub/Sub client that exhibits high 'output buffer' usage relative to its ingestion rate?
- How does a 'Sorted Set' (ZSET) manage its internal membership and ordering differently from a plain Set?