Hi Ram, I also faced this issue before. I think JVM only resolves the DNS records once when ZK service starts. After that, even if you update the DNS record to a new IP address and the ZK server itself is able to resolve the new DNS record, the JVM will not pick up the new IP address. I think the only way is to restart the ZK service.
You could use IP addresses instead of DNS records in your ZK config. In this way, each time you want to replace a ZK server, you could launch a new server with the same IP address. This could fix the issue. Btw, with the dynamic config feature introduced in ZK 3.5+, ZK should be able to recognize the IP address of the new ZK server automatically. HTH, Zhewei -- Sent from: http://zookeeper-user.578899.n2.nabble.com/