All Questions
Redis hard

The Redlock algorithm requires acquiring locks on N independent Redis masters. Why is N strategically choosing to be an odd number (e.g., 5)?

  1. A To prevent split-brain by ensuring there is no possible mathematical tie in the node-level acquisition process.
  2. B To enable majority consensus (Quorum); requiring (N/2)+1 locks ensures the lock remains valid despite partial node failure.
  3. C It is a performance optimization that leverages the CPU's inability to handle even-numbered bitmask operations.
  4. D Even-numbered cluster configurations are strictly unsupported in the native Redis cluster messaging protocol.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions