Zookeeper hard
What is the specific architectural role of the 'LearnerHandler' threads executed on the ZooKeeper Leader node?
- A They act as a thread-pool for handling high-concurrency client authentication handshakes.
- B There is a dedicated thread for each remote participant; it manages the communication (proposals, commits, pings) for that specific Follower/Observer.
- C They perform periodic background checksum validation of the local transaction log against the OS disk cache.
- D They are responsible for cleaning up expired client sessions and reaming the associated ephemeral Znode pointers.
Answer: B. There is a dedicated thread for each remote participant; it manages the communication (proposals, commits, pings) for that specific Follower/Observer.
The Leader doesn't broadcast to a generic group. It maintains a dedicated TCP pipe and handler thread for every single node in the ensemble to manage their individual sync states.
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?