Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.05 KB

README.md

File metadata and controls

28 lines (17 loc) · 1.05 KB

Raft

This repository implements Raft in Go.

Overview

In computer science there is a common problem whenever you deal with more than one computer, a node. That is, to make sure all the nodes in a system can agree to what is happening - creating a shared state even when one node gets disconnected. This process of reaching agreement is called consensus. In the case of Raft, it's a simple algorithm for achieving this consensus through the use of an elected leader. The leader dictates what changes are accepted or rejected to reach consensus for which all the other nodes follow. These followers must implement the changes or get booted from the system. If the elected leader goes down, a new leader gets elected from potential candidates who democratically get elected by the followers.

Usage

go run raft.go

Dependencies

Requires the protoc compiler with the go output plugin installed as it uses Protocol Buffers.

run go mod vendor to install dependencies

Set up redis instance with default options

make clean