Github user sslavic commented on the issue:

    https://github.com/apache/zookeeper/pull/150
  
    @riccardofreixo have you tried using ClusterIP Service for ZooKeeper 
StatefulSet and providing that ClusterIP (or service hostname) to Kafka / 
ZooKeeper clients as sole ZooKeeper hostname?
    
    StatefulSet can have multiple replicas, but to ZooKeeper clients all of the 
members no matter how many of them there are (1, 3, 5, ..) would be accessible 
under single ClusterIP.
    
    Even when Pods of StatefulSet die and get re-scheduled for whatever reason, 
they will likely get new IP, but IP of ClusterIP Service remains stable so 
ZooKeeper clients should be able to reconnect, without need to reresolve IP 
address of the host.
    
    If there's a quorum, Pod that died does not necessarily have to become 
available quickly, clients should still be able to connect even without losing 
session.


---

Reply via email to