Raft explanation

What is distributed consensus

Raft Leader election (brief)

Each node in system can be in 3 states:

By default all nodes are followers. If follower doesn't hear from a leader for some time then it becomes candidate and requests votes from other nodes.

Raft Log Replication (brief)

Raft Leader election details

election timeout Time that follower wait until becoming the candidate. Randomized between 150ms and 300ms.

If 2 nodes becoming candidate at same time split vote may occur (both voted for itself in current term, and have equal votes from other, so no one has MAJORITY !), all will wait next term


If network partitioned:
Client cant write 3 because majorite not written:

Another client can write:

After merging partitioned network, leader B will see higher election term and step down (A and B will rollback uncommitted entries and match leader's log

menu 1
Jul 27, 2017
by Ivan Borshchov

Other by Ivan Borshchov

Simple way to Docker on Windows 10 home with WSL 2

Flask vs django | easy expert comparison

Extend EC2 ext3 filesystem

Resource sharing: has been blocked by cors policy [Explain like I am 5]

How to reset mysql root password on ubuntu

Using painterro with Vue.js

Change svg color in vue.js

Fast upload file to AWS S3 from scratch

Simple way to add counts to Django admin filter

Network between 2 instances of OpenVPN