All Questions
Zookeeper medium

A ZooKeeper client reads data from a Follower that is slightly lagging. How can the client ensure it receives the absolute latest state from the Leader?

  1. A Invoke a `sync()` command before the read; this forces the Follower to synchronize its state with the Leader before returning data.
  2. B Wait for at least 5 `tickTime` intervals to ensure the ZAB protocol has propagated all pending transaction logs.
  3. C Perform a recursive checksum validation of the parent Znode to detect if the local replica is stale.
  4. D Initialize a new TCP connection directly to the Leader's 2181 port and bypass the Follower entirely.

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

Get the app

Related questions