News for hackers. Stuff that matters.

Muzzaf

Re:What is wrong with Comic Sans? on Sunday September 07, 2014 @09:43AM (#8281095)
The day when the entire arXiv is re-typeset in Comic Sans cannot come soon enough. Rebels like Peyton-Jones are truly fighting the good fight.
Re:What is wrong with Comic Sans? on Sunday September 07, 2014 @08:20AM (#8280921)
http://www.cs.virginia.edu/~robins/YouAndYourResearch.html

> John Tukey almost always dressed very casually. He would go into an important office and it would take a long time before the other fellow realized that this is a first-class man and he had better listen. For a long time John has had to overcome this kind of hostility. It's wasted effort! I didn't say you should conform; I said ``The appearance of conforming gets you a long way.'' If you chose to assert your ego in any number of ways, ``I am going to do it my way,'' you pay a small steady price throughout the whole of your professional career. And this, over a whole lifetime, adds up to an enormous amount of needless trouble.

Re:Raft: Understandable Distributed Consensus on Friday September 05, 2014 @11:51AM (#8274540)
At most one side can elect a new leader, since there are an odd number of nodes.
Re:Raft: Understandable Distributed Consensus on Friday September 05, 2014 @11:21AM (#8274344)
Not sure I understand. A node in each split cluster would need at least 4 votes to be elected leader. Hence no node can be elected leader since all split clusters have strictly fewer than 4 nodes.

Theorem. With 2n + 1 nodes, there can not be two separate majorities after a net split.

Proof. By way of contradiction, assume there are two separate majorities. Each separate majority would contain at least ceil((2n + 1)/2) = n + 1 nodes. This implies that there are in total at least 2(n + 1) = 2n + 2 nodes in the system, contradiction.

Re:Raft: Understandable Distributed Consensus on Friday September 05, 2014 @10:09AM (#8273924)
See section 10 of the Raft paper.

> VR uses a leaderbased approach with many similarities to Raft.

> However, Raft has less mechanism that VR or ZooKeeper because it minimizes the functionality in non-leaders. For example, log entries in Raft flow in only one direction: outward from the leader in AppendEntries RPCs. In VR log entries flow in both directions (leaders can receive log entries during the election process); this results in additional mechanism and complexity

> Raft has fewer message types than any other algorithm for consensus-based log replication that we are aware of. For example, we counted the message types VR and ZooKeeper use for basic consensus and membership changes (excluding log compaction and client interaction, as these are nearly independent of the algorithms). VR and ZooKeeper each define 10 different message types, while Raft has only 4 message types (two RPC requests and their responses).

Re:Raft: Understandable Distributed Consensus on Friday September 05, 2014 @09:53AM (#8273848)
> What happens if (for instance) a 4 node cluster splits into 2 node clusters (I.E. a network fault between two data centers)- does each cluster choose a leader?

A Raft cluster must have an odd number of nodes.

> how are is "majority" calculated?

ceil(nodes/2).

> is the raft protocol unable to handle half of it's nodes being taken down? What happens if two clusters break off, both choose a leader (if it's possible), both gets new writes and then both clusters come back together?

They cannot each choose a leader, see above.

Re:Raft: Understandable Distributed Consensus on Friday September 05, 2014 @09:50AM (#8273833)
That is correct. The solution to this is given in section 5.4.1 (election restriction), section 5.4.2 (Committing entries from previous terms) and section 8 (Client interaction) of the Raft paper.

Roughly, a newly elected leader will have all committed entries (guaranteed by the "election restriction", 5.4.2) but it does not know precisely which are committed. The new leader will commit a no-op log entry (section 8) and after it has received replies from a majority of the cluster it will know which entries have already been committed.