2. RAFT
โช What is RAFT?
โช Consensus algorithm
โช Solves fundamental problem in fault-tolerant distributed
system
โช Multiple servers agree on value
One of the Ways How to Make RIB Distributed
3. RAFT
โช Why we chose RAFT?
โช Understable version of Paxos
โช Easy to implement
โช The same fault-tolerance and performance guarantees
โช Suitable for RINA environment and RPC
communication
โช Already used in databases like InfluxDB
One of the Ways How to Make RIB Distributed
4. RAFT RPCs
โช RequestVotes
โช Send by Candidates during Leader election to gather
votes
โช AppendEntries
โช Sent by Leader for log replication
โช Also sent by Leader as an HeartBeat to reset timers
One of the Ways How to Make RIB Distributed
5. Leader Election
โช Based on the timer expiration
โช Presumption that all nodes are equal
One of the Ways How to Make RIB Distributed
Follower
Timeout:
300ms
Follower
Timeout:
200ms
Follower
Timeout:
150ms
6. Leader Election
โช Based on the timer expiration
โช Presumption that every nodes are equal
One of the Ways How to Make RIB Distributed
Follower
Timeout:
300ms
Follower
Timeout:
200ms
Candidate
Timeout:
150ms
Vote for itself
Request vote Request vote
7. Leader Election
โช Based on the timer expiration
โช Presumption that every nodes are equal
One of the Ways How to Make RIB Distributed
Follower
Timeout:
300ms
Follower
Timeout:
200ms
Candidate
Timeout:
150ms
Grant votes Grant votes
Majority votes
8. Leader Election
โช Based on the timer expiration
โช Presumption that every nodes are equal
One of the Ways How to Make RIB Distributed
Follower
Timeout:
300ms
Follower
Timeout:
200ms
Leader
Timeout:
150ms
9. Log Replication
โช Each client request is stored in the Leaderโs log
โช Leader replicate new log entries to the Followers
โช Command
โช Sent by the client to be executed
โช Index
โช Position identifier in the log
โช Term Number
โช Identification of the time of the command
One of the Ways How to Make RIB Distributed
10. Client Request
One of the Ways How to Make RIB Distributed
Follower
Timeout:
300ms
Follower
Timeout:
200ms
Leader
Timeout:
150ms
Client
Request
Response
11. RAFT RINA Approach
โช Not possible to use current RAFT implementation
โช RINA RPC commands as RAFT client commands
โช RAFT Leader shared during Enrollment phase
โช RIB
โช RPC commands stored in RAFT log
One of the Ways How to Make RIB Distributed
12. RAFT module
โช Current state of the Application Process
โช RAFT provided as compound module within RIBDaemon
โช Management of objects in RIB
โช Replication and updates primarily using Management AE
One of the Ways How to Make RIB Distributed