Open source Java implementation for Raft consensus protocol.

Clone this repo:
  1. 6d471e6 RATIS-2321. Fix NPE in ServerState after continuous leader changes (#1280) by Jiang Tian · 9 days ago master
  2. d824c4e RATIS-2317. Move acquire PendingRequestPermit out of synchronized block in RaftServerImpl#appendTransaction. (#1275) by Nandakumar Vadivelu · 6 weeks ago
  3. b73c44c RATIS-2314. Fix that SegmentedRaftLogWorker may append entry by itself. (#1274) by Jiang Tian · 7 weeks ago
  4. 15e1d92 RATIS-2310. Implement hashCode and equals method for SizeInBytes class. (#1272) by Nandakumar Vadivelu · 10 weeks ago
  5. 3612bca RATIS-2221. Remove ratis-replicated-map module (#1260) by Doroszlai, Attila · 2 months ago

Apache Ratis

Apache Ratis is a Java library that implements the Raft protocol [1], where an extended version of the Raft paper is available at https://raft.github.io/raft.pdf. The paper introduces Raft and states its motivations in following words:

Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos, and it is as efficient as Paxos, but its structure is different from Paxos; this makes Raft more understandable than Paxos and also provides a better foundation for building practical systems.

Ratis aims to make Raft available as a java library that can be used by any system that needs to use a replicated log. It provides pluggability for state machine implementations to manage replicated states. It also provides pluggability for Raft log, rpc implementations and metric implementations to make it easy for integration with other projects. Another important goal is to support high throughput data ingest so that it can be used for more general data replication use cases.

Reference

  1. Diego Ongaro and John Ousterhout, In Search of an Understandable Consensus Algorithm, 2014 USENIX Annual Technical Conference (USENIX ATC 14) (Philadelphia, PA), USENIX Association, 2014, pp. 305-319.