Zookeeper hard
In ZK 3.5+, you can change the cluster membership (add/remove nodes) without a rolling restart. Where is this configuration stored?
- A In `zoo.cfg` only.
- B In a special ZNode `/zookeeper/config` which contains the dynamic membership list. The static `zoo.cfg` acts as a bootstrap, but the ZNode is the source of truth.
- C In the Leader's RAM.
- D In DNS.
Answer: B. In a special ZNode `/zookeeper/config` which contains the dynamic membership list. The static `zoo.cfg` acts as a bootstrap, but the ZNode is the source of truth.
Dynamic Reconfig moves the config from a static file to the database itself, allowing the configuration to be versioned and replicated via ZAB just like user data.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the primary technical function of a ZooKeeper 'Watch'?
- A system administrator increases `jute.maxbuffer` to 5MB on every ZooKeeper server to store large configuration objects. However, write operations larger than 1MB still fail. What is the most likely cause?
- By default, `forceSync` is enabled. If you disable it, what trade-off are you making?
- If the specific ZooKeeper node a client is connected to crashes, what should the client do?
- Which cluster configuration has *worse* availability: A 3-node cluster or a 4-node cluster? (Assuming simple majority quorum)
- According to the CAP Theorem, how is ZooKeeper classified?