Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-368

Observers: core functionality

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • quorum
    • None
    • Reviewed
    • Observers functionality in zookeeper. please read docs/zookeeperObservers.pdf/.html for more information.

    Description

      Edit (Henry Robinson/henryr) 12/11/09:

      This JIRA specifically concerns the implementation of non-voting peers called Observers, their documentation and their tests.

      Explicit goals are 1. not breaking any current ZK functionality, 2. enabling at least one deployment scenario involving Observers, 3. documentation describing how to use the feature and 4. tests validating the correct behaviour of 2.

      Non goals of this JIRA are 1. performance optimizations specific to Observers, 2. compatibility with every feature of ZooKeeper (in particular all leader election protocols), which are both to be addressed in future JIRAs.

      See http://wiki.apache.org/hadoop/ZooKeeper/Observers for more detail of use cases, proposed design and usage.

      See http://wiki.apache.org/hadoop/ZooKeeper/Observers/ReviewGuide for a brief commentary on the current patch.

      -------------

      Currently, all servers of an ensemble participate actively in reaching agreement on the order of ZooKeeper transactions. That is, all followers receive proposals, acknowledge them, and receive commit messages from the leader. A leader issues commit messages once it receives acknowledgments from a quorum of followers. For cross-colo operation, it would be useful to have a third role: observer. Using Paxos terminology, observers are similar to learners. An observer does not participate actively in the agreement step of the atomic broadcast protocol. Instead, it only commits proposals that have been accepted by some quorum of followers.

      One simple solution to implement observers is to have the leader forwarding commit messages not only to followers but also to observers, and have observers applying transactions according to the order followers agreed upon. In the current implementation of the protocol, however, commit messages do not carry their corresponding transaction payload because all servers different from the leader are followers and followers receive such a payload first through a proposal message. Just forwarding commit messages as they currently are to an observer consequently is not sufficient. We have a couple of options:

      1- Include the transaction payload along in commit messages to observers;
      2- Send proposals to observers as well.

      Number 2 is simpler to implement because it doesn't require changing the protocol implementation, but it increases traffic slightly. The performance impact due to such an increase might be insignificant, though.

      For scalability purposes, we may consider having followers also forwarding commit messages to observers. With this option, observers can connect to followers, and receive messages from followers. This choice is important to avoid increasing the load on the leader with the number of observers.

      Attachments

        1. ZOOKEEPER-368.patch
          105 kB
          Henry Robinson
        2. ZOOKEEPER-368.patch
          103 kB
          Henry Robinson
        3. ZOOKEEPER-368.patch
          74 kB
          Henry Robinson
        4. ZOOKEEPER-368.patch
          74 kB
          Henry Robinson
        5. observers sync benchmark.png
          15 kB
          Henry Robinson
        6. observers.patch
          58 kB
          Henry Robinson
        7. obs-refactor.patch
          100 kB
          Henry Robinson
        8. observer-refactor.patch
          100 kB
          Henry Robinson
        9. ZOOKEEPER-368.patch
          79 kB
          Henry Robinson
        10. ZOOKEEPER-368.patch
          78 kB
          Henry Robinson
        11. ZOOKEEPER-368.patch
          72 kB
          Flavio Paiva Junqueira
        12. ZOOKEEPER-368.patch
          78 kB
          Henry Robinson
        13. ZOOKEEPER-368.patch
          24 kB
          Flavio Paiva Junqueira
        14. ZOOKEEPER-368.patch
          25 kB
          Henry Robinson

        Issue Links

          Activity

            People

              henryr Henry Robinson
              fpj Flavio Paiva Junqueira
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: