Questions tagged [raft]

A distributed consensus protocol designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and performance.

Click for source

Raft is a consensus algorithm that is designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and performance. The difference is that it's decomposed into relatively independent subproblems, and it cleanly addresses all major pieces needed for practical systems. We hope Raft will make consensus available to a wider audience, and that this wider audience will be able to develop a variety of higher quality consensus-based systems than are available today.

Consensus is a fundamental problem in fault-tolerant distributed systems. Consensus involves multiple servers agreeing on values. Once they reach a decision on a value, that decision is final. Typical consensus algorithms make progress when any majority of their servers are available; for example, a cluster of 5 servers can continue to operate even if 2 servers fail. If more servers fail, they stop making progress (but will never return an incorrect result).

Consensus typically arises in the context of replicated state machines, a general approach to building fault-tolerant systems. Each server has a state machine and a log. The state machine is the component that we want to make fault-tolerant, such as a hash table. It will appear to clients that they are interacting with a single, reliable state machine, even if a minority of the servers in the cluster fail. Each state machine takes as input commands from its log. In our hash table example, the log would include commands like set x to 3. A consensus algorithm is used to agree on the commands in the servers' logs. The consensus algorithm must ensure that if any state machine applies set x to 3 as the nth command, no other state machine will ever apply a different nth command. As a result, each state machine processes the same series of commands and thus produces the same series of results and arrives at the same series of states.

259 questions
2
votes
2 answers

How is Raft linearlizable?

I am pretty new to distributed systems and was wondering how Raft consensus algorithm is linearizable. Raft commits log entries through quorum. At the moment the leader Raft commits, this means that more than half of the participants has the…
Brian Shih
  • 301
  • 1
  • 8
2
votes
1 answer

How does Multi-Raft group nodes together?

I am trying to implement a similar architecture to Cockroachdb's multi-raft: https://www.cockroachlabs.com/blog/scaling-Raft/. Does anyone have a brief explanation to how Multi-Raft group these individual Raft clusters? Specifically, is there a Raft…
Brian Shih
  • 301
  • 1
  • 8
2
votes
1 answer

Performance Difference bet RAFT Orderer and Orderer with Kafka(Latency, Throughput, TPS)

Did anyone compare performance(Latency, Throughput, TPS) between orderer with Kafka and RAFT Orderer? I could see here a considerable difference in terms of latency, throughput, and TPS. I tried with the same setup with the same resource…
2
votes
0 answers

What is the valuation of Snapshot process in Raft Consensus of Fabric?

I'm digging into the new consensus of Hyperledger Fabric 1.4. The concept of Raft and the way it works is quite clear in the document. But there is a concept called snapshot, which is While it’s possible to keep all logs indefinitely, in order to…
Hnampk
  • 517
  • 6
  • 17
2
votes
1 answer

Raft question - write availability in-between leader election

For a system that implements Raft, if the leader node goes down and between the time the leader is down and a new leader is elected, a log write request arrives, then does it succeed or is the system unavailable during this period?
user855
  • 19,048
  • 38
  • 98
  • 162
2
votes
1 answer

Raft algorithm: When will term increase?

Raft divides time into terms of arbitrary length, as shown in Figure 5. Terms are numbered with consecutive integers. Each term begins with an election, in which one or more candidates attempt to become leader as described in Section 5.2. If a…
Ryan Lyu
  • 4,180
  • 5
  • 35
  • 51
2
votes
1 answer

In raft leader election,how live leader response to RequestVote rpc from a candidate?

i am reading the raft paper. To the requestvote rpc, Receiver implementation: 1. Reply false if term < currentTerm (§5.1) 2. If votedFor is null or candidateId, and candidate’s log is at least as up-to-date as receiver’s log, grant vote…
zhu wang
  • 139
  • 5
2
votes
1 answer

Explanation of "Another Advantage of Free Choice: Completely Asynchronous Agreement Protocols"

Can anyone, please, clarify step 3 (see below) in the "Completely Asynchronous Agreement Protocol": Process P: Initial value xp. Step 0: set r := 1. Step 1: Send the message (1, r, xp) to all the processes. Step 2: Wait till N - t messages of type…
DimanNe
  • 1,791
  • 3
  • 12
  • 19
2
votes
1 answer

Does a leader have any other responsibility other than replication in Raft, like load balancing?

We are trying to implement Raft in a chat application. As far as I read, Raft is for replication and thats it. So when a client wants to connect to the chat server for chatting with another client, does Raft require that all the clients connect to…
Rency
  • 23
  • 2
2
votes
1 answer

How raft algorithm maintains strong read consistency in case of write failure followed by a node failure

Consider three nodes(A,B,C) getting key/value data. And the following steps happened Node A receive key:value (1:15). It is a leader It replicate to node B and node C Entry made to node B in pre commit log Node C fail the entry Ack from node B is…
2
votes
0 answers

Neo4j Casual Clustering - Servers cannot discover each other

I was trying to deploy a Neo4j (3.1 enterprise) Causal cluster, I've read the Operations Manual very carefully, and tried to create a 3 core cluster on my local machine (using both fresh installations and docker). But, when I'm trying to deploy the…
user1396033
  • 215
  • 3
  • 11
2
votes
2 answers

In Docker swarm mode, is there a way to get managers' information from workers?

In docker swarm mode I can run docker node ls to list swarm nodes but it does not work on worker nodes. I need a similar function. I know worker nodes does not have a strong consistent view of the cluster, but there should be a way to get current…
Berk
  • 338
  • 5
  • 11
2
votes
1 answer

How does raft deal with log in this scenario?

Assume d is elected as an leader in the above picture, how will it deal with the log with index 11 and 12. In my opinion, it should delete the two logs, but I don't find any clues in the raft paper about how to deal logs like the above scenario.
Charles0429
  • 1,406
  • 5
  • 15
  • 31
2
votes
1 answer

RAFT: term condition to commit an entry

I've been reading several documentation on Raft and I've getting contradictory information about the commit. I get that an entry can only be committed if it's known to be stored in the majority of servers but, is there any other condition? I've read…
vandermies
  • 183
  • 3
  • 14
2
votes
2 answers

Is a replication log necessary to achieve linearizability in distributed store

The Raft algorithm used by etcd and ZAB algorithm by Zookeeper are both using replication log to update a state machine. I was wondering if it's possible to design a similar system by simply using leader election and versioned values. And why those…
skyde
  • 2,816
  • 4
  • 34
  • 53