Flavio Paiva Junqueira commented on ZOOKEEPER-368:

for the dynamic ensemble patch we want to be able to convert observers to 
followers easily and quickly. flipping a switch at the observer to start 
sending ACKs and at the leader to start acknowledging the ACKs would be an easy 
way to do the conversion.

We need a transition from OBSERVING to FOLLOWING on the state of QuorumPeer, 
and  I believe your concern is that we end up doing a state transfer when 
undergoing that transition. Is it right?

i'm trying to understand the use case for a follower that connects as an 
observer. this would adversely affect the reliability of the system since a 
follower acting as an observer would count as a failed follower even though it 
is up. did you have a case in mind?

Why would a follower connect as an observer? I guess I'm missing the point here.

i think it is reasonable to turn off the sync for the observer, but we probably 
still want to log to disk so that we can recover quickly. otherwise we will 
keep doing state transfers from the leader every time we connect. right?

I believe you're suggesting this because you're afraid that an observer that 
re-connects too often might end up overwhelming the leader. A third option 
would be to have the observer only keeping the database in memory and having 
the leader limiting the frequency of state transfers to observers. If you're 
concerned about the performance of an observer, then it might be an idea to 

> Observers
> ---------
>                 Key: ZOOKEEPER-368
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-368
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: quorum
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Henry Robinson
>         Attachments: ZOOKEEPER-368.patch, ZOOKEEPER-368.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. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to