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
0
votes
1 answer

When should a Raft follower record an RPC?

I'm learning Raft from the paper's extended version. In section 5.2 (Leader Election) of the paper, it says: If a follower receives no communication over a period of time called the election timeout, then it assumes there is no viable leader and…
IcicleF
  • 61
  • 5
0
votes
0 answers

Use RAFT in fabric got rpc error: code = Unavaliable

I have 3 orderer nodes and 5 peer nodes in my fabric network. And I have tried to use raft consensus in my fabric network, but I got such error in the orderer logs: 2021-04-03 07:13:03.556 UTC [orderer.consensus.etcdraft] logSendFailure -> DEBU 1dc6…
Mikasa JD
  • 83
  • 4
0
votes
1 answer

Raft Leader election , When the candidater receive a voteRequest with Higher Term, what should the candidater do?

I know that when the candidater receive a heartbeat with higher Term, it will convert to follower of the new leader. but there is a case the Raft paper do not talk about. When the candidater receive a voteRequest with Higher Term, what should the…
0
votes
1 answer

Hashicorp Vault Snapshot Decryption

I created a snapshot of my vault server with the following command: vault operator raft snapshot save snapshot.save I now have a file of the snapshot, and I am able to use it to restore the server. I am trying to decrypt and read the snapshot file…
Lukeriggz
  • 167
  • 4
  • 17
0
votes
0 answers

Could Google Spanner be implemented by Raft instead of TrueTime?

Spanner's TrueTime API claims to be necessary for strong consistency and very high availability is achieved. I wonder if the same level of consistency and availability can be achieved using Raft(w/o atomic clock which is not practical for most of…
luanjunyi
  • 1,634
  • 1
  • 15
  • 17
0
votes
1 answer

Can raft ordering service have consenter set?

Our DLT network requires high TPS and splitting ordering service into 3 different locations will have a negative impact on the performance as per raft protocol all ordering nodes(deployed on different locations) will take part in consensus. So we…
NehaG
  • 864
  • 1
  • 7
  • 15
0
votes
1 answer

Why Raft leader sends empty AppendEntries RPCs upon election

In Search of an Understandable Consensus Algorithm (Extended Version): Upon election: send initial empty AppendEntries RPCs (heartbeat) to each server; repeat during idle periods to prevent election timeouts Why sends empty AppendEntries RPCs but…
Gomo
  • 47
  • 6
0
votes
1 answer

Configuring multiple Consortium in Hyperledger Fabric 1.4

In fabric sample, Consortium is defined for two organization and there is provided proile for single consortium Consortium: SampleConsortium in configtx.yaml file. I have tried to configure two consortium, XYZCosortium and PQRConsortium. The…
Gopal ojha
  • 109
  • 1
  • 5
0
votes
1 answer

Java server connect to other server using sockets

I have a project where I have to build a system where multiples server communicate between each other to respond to clients. I can make the client communicate with the server but I'm having problems on making the servers start a connection between…
Madroks
  • 115
  • 1
  • 1
  • 5
0
votes
2 answers

Why RAFT protocol rejects RequestVote with lower term?

In raft every node rejects any request with term number lower than it's own. But why do we need this for RequestVote rpc? If Leader Completeness Property holds, then node can vote for this candidate, right? So why reject request? I can't come up…
0
votes
1 answer

What happens to uncommitted previous term log entries in Raft algorithm?

There are a number of questions here on StackOverflow around Figure 8, discussed in section 5.4.2 in the original Raft paper: Figure 8 What has not been made clear by the paper and by none of the answers is the exact fate of that problematic entry…
eliquinox
  • 3
  • 1
0
votes
3 answers

Trying to build hyperledger fabric2.0 on multiple hosts, no raft leader

I've tried to build hyperledger fabric2.0 on multiple hosts, following this passage:https://medium.com/@kctheservant/multi-host-setup-with-raft-based-ordering-service-29730788b171. But when I execute this step to create channel genesis block: docker…
0
votes
1 answer

How raft node know itself has voted after an crash recover?

If an raft node has voted for some candidate ,then crash before it could persistent the vote info, will the server has re-vote ability after restart?
wang
  • 53
  • 5
0
votes
1 answer

RPC call cannot find method

I'm trying to implement Raft consensus algorithm but for some reason having trouble using RPC calls. I'm using labrpc.go to make calls. My function signature: func (rf *Raft) RequestVotes(args RequestVoteArgs, reply *RequestVoteReply) bool and the…
kpool
  • 69
  • 1
  • 6
0
votes
1 answer

Kubernetes pod - when it's ready to serve traffic?

I am currently building a distributed consensus system such that it is important to know exactly when a Kubernetes pod can serve traffic (accept http requests). Any ideas as to how I can do that apart from setting a timer to keep making requests to…
Brian Shih
  • 301
  • 1
  • 8