• This repository has been archived on 17/Jan/2018
  • Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    Go
  • License
    BSD 2-Clause "Sim...
  • Created over 11 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of the Raft distributed consensus protocol.

raft

This is an implementation of the Raft distributed consensus protocol. It's heavily influenced by benbjohnson's implementation. It focuses on providing a clean and usable API, and well-structured internals.

Build Status

Usage

A node in a Raft network is represented by a Server structure. In a typical application, nodes will create a Server, and expose it to other nodes using a Peer interface.

Servers are only useful when they can communicate with other servers. This library includes a HTTP Transport (ingress) and HTTP Peer (egress) which combine to allow communication via REST-ish endpoints. For now, it's the simplest way to embed a Raft server in your application. See this complete example.

Several other transports are coming; see TODO, below.

Adding and removing nodes

The Raft protocol has no affordance for node discovery or "join/leave" semantics. Rather, the protocol assumes an ideal network configuration that's known a priori to nodes in the network, and describes a mechanism (called joint-consensus) to safely replicate that configuration.

My implementation of joint-consensus abides those fundamental assumptions. Nodes may be added or removed dynamically by requesting a SetConfiguration that describes a complete network topology.

TODO

  • Leader election done
  • Log replication done
  • Basic unit tests done
  • HTTP transport done
  • net/rpc transport
  • Other transports?
  • Configuration changes (joint-consensus mode) done
  • Log compaction
  • Robust demo application ☜ in progress
  • Complex unit tests (one per scenario described in the paper)

More Repositories

1

diskv

A disk-backed key-value store.
Go
1,401
star
2

ff

Flags-first package for configuration
Go
1,366
star
3

go-microservices

Go microservices workshop example project
Go
360
star
4

caspaxos

A Go implementation of the CASPaxos protocol
Go
293
star
5

g2s

Get to Statsd: forward simple statistics to a statsd server
Go
149
star
6

how-i-start-go

How I Start: Go
Go
143
star
7

trc

In-process request tracing
Go
93
star
8

mergemap

Go library to recursively merge JSON maps
Go
93
star
9

unixtransport

Support for Unix domain sockets in Go HTTP clients
Go
79
star
10

ctxdata

A helper for collecting and emitting metadata throughout a request lifecycle.
Go
75
star
11

g2g

Get to Graphite: publish Go expvars to a Graphite server
Go
72
star
12

grender

A different take on a static site generator
Go
59
star
13

goop

An audio synthesizer in Go
Go
57
star
14

prometheus-aggregator

Prometheus metrics aggregator
Go
42
star
15

runsvinit

A Docker init process for graceful shutdown of runit services.
Go
39
star
16

gattaca

A monolith and microservices example repository
Go
39
star
17

go-training

Exercises
Go
38
star
18

conntrack

Track incoming and outgoing connections
Go
32
star
19

elasticsearch

ElasticSearch client library for Go
Go
30
star
20

infrastructure

My servers, let me show you them
Shell
26
star
21

sshttp

SSH/HTTP demuxing and proxying server
Go
25
star
22

ps

Publish/subscribe utility
Go
23
star
23

lightctl

Control program for IKEA TRΓ…DFRI smart lights
Go
19
star
24

wtf

Demonstrates a serious problem in the implementation of Go vendoring
Go
19
star
25

breakfast-solutions

A dumb service to illustrate principles of observability
Go
19
star
26

sympatico

Deprecated, please refer to peterbourgon/gattaca
17
star
27

dotfiles

πŸŒ€
Shell
15
star
28

ctxlog

Create wide log events in Go programs
Go
15
star
29

ffcli

A minimal package for building flags-first command line interfaces
12
star
30

http-proxy

An HTTP server with a simple config format that proxies to localhost
Go
11
star
31

stats

Compute normal stats on numbers from stdin.
Go
11
star
32

lpg

Local Prometheus and Grafana: work with metrics during development
Makefile
9
star
33

reference

Go kit reference service
Go
8
star
34

srvproxy

Proxy for DNS SRV records
Go
7
star
35

peter-bourgon-org

My web site.
HTML
4
star
36

numberstation

Emit data for websocket listeners
Go
4
star
37

hose-poet

Consume from the firehose; unearth accidental prose
C
4
star
38

tns

Dockertime
Go
3
star
39

crc32

Generate crc32 checksums of data
Go
2
star
40

usage

Nicer help text for Go programs
Go
2
star
41

grid

Controller software for the Monome Grid 128
Go
2
star
42

squawkbox

Squawk!
Go
1
star
43

sums

Does sums
Go
1
star
44

moduledemo

blah
Go
1
star
45

dummyrelease

Go
1
star
46

thirtyfour.org

Hypertext products
Go
1
star