Zookeeper hard
What is the difference between `initLimit` and `syncLimit` in `zoo.cfg`?
- A `initLimit` is for the initial connection phase (allowing Followers time to load a large snapshot). `syncLimit` is for normal operation (heartbeats/updates).
- B `initLimit` is for clients, `syncLimit` is for servers.
- C `initLimit` is smaller than `syncLimit`.
- D They are the same.
Answer: A. `initLimit` is for the initial connection phase (allowing Followers time to load a large snapshot). `syncLimit` is for normal operation (heartbeats/updates).
Loading 5GB of data takes time. `initLimit` is generous (e.g., 20 ticks) to allow a node to boot and sync. `syncLimit` is strict (e.g., 5 ticks) to detect failures quickly during runtime.
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?