Get the latest tech news

Implementing Raft: Part 0 – Introduction (2020)


This is the first post in a multi-part series describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a complete list: - Part 0: Introduction (this post) - Part 1: Elections - Part 2: Commands and log replication - Part 3: Persistence and optimizations - Part 4: Key/Value database - Part 5: Exactly-once delivery Raft is a relatively new algorithm (2014), but it's already being used quite a bit in industry.

All it aims to achieve is the ability to reliably and deterministically record and reproduce the sequence of inputs(also called commands in Raft parlance) to a state machine. Every component in a modern computer can fail, but to make the discussion a bit easier let's treat a server running a Raft instance as an atomic unit. This brings us to the CAP theorem, the practical consequence of which is that in the presence of network partitions (which are an unavoidable part of life), we have to carefully balance availability vs. consistency.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of raft

raft

Photo of consensus algorithm

consensus algorithm

Related news:

News photo

Booking Plans Job Cuts as Part of Raft of Organizational Changes

News photo

Temu’s low-cost marketplace faces formal probe in EU over raft of DSA compliance concerns

News photo

Raft: Understandable Distributed Consensus (2014)