ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1031

Introduce virtual cluster IP and start that cluster IP on the host running ZK leader

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.3
    • Fix Version/s: 4.0.0
    • Component/s: leaderElection, quorum
    • Labels:
      None

      Description

      It would be useful to enable a way to specify a virtual (floating) IP for the ZK cluster (say in zoo.cfg). The ZK leader will start this IP on one of its interfaces. If the leadership changes, the cluster IP will be taken over by the new leader. This IP can be used to identify the ZK leader and send administrative commands/query to the leader. For example,

      • a ZK client can get the list of ZK servers in the configuration by sending a request to the server running this IP address. The client just needs to know one IP address. Availability of cluster automatically ensures availability of
        the IP address.
      • To reconfigure ZK configuration, a client can send reconfig request to the server on this IP and keep retrying until the request succeeds or fails.

      Implementation issues:
      1. The old ZK leader that has lost leadership should be able to somehow give up the virtual IP address. Otherwise, it could lead to collisions. One solution is to self reboot. A system property can be used to specify ways to unplumb the cluster IP
      2. Cross-platform support.
      3. Refreshing ARP caches

        Activity

        Hide
        Benjamin Reed added a comment -

        a leader needs to be running on the virtual IP. it just needs to be a machine with an accurate view of the system. obviously the leader has such a view, but so do the followers of the leader.

        Show
        Benjamin Reed added a comment - a leader needs to be running on the virtual IP. it just needs to be a machine with an accurate view of the system. obviously the leader has such a view, but so do the followers of the leader.
        Hide
        Vishal Kher added a comment -

        Yes, but which follower should start the IP? There needs to be some level of agreement (like election). So it is easier to run it on the leader. Also, the node running this IP should not be behind the leader. Otherwise, fetching administartive info (e.g., configruation info) may return stale results.

        Show
        Vishal Kher added a comment - Yes, but which follower should start the IP? There needs to be some level of agreement (like election). So it is easier to run it on the leader. Also, the node running this IP should not be behind the leader. Otherwise, fetching administartive info (e.g., configruation info) may return stale results.
        Hide
        Alexander Shraer added a comment -

        virtual IP might not be easy to implement if the real ip can switch subnets - suppose a new leader is in a different subnet than the previous one (and also different from the subnet of the virtual IP). There seem to be types of virtual IP that support this, but I'm not sure how general this is.

        Show
        Alexander Shraer added a comment - virtual IP might not be easy to implement if the real ip can switch subnets - suppose a new leader is in a different subnet than the previous one (and also different from the subnet of the virtual IP). There seem to be types of virtual IP that support this, but I'm not sure how general this is.

          People

          • Assignee:
            Unassigned
            Reporter:
            Vishal Kher
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development