Apache Incubator Apache Ratis is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

What is Apache Ratis™?

Apache Ratis is a highly customizable Raft protocol implementation in Java.

Raft is a easily understandable consensus algorithm to manage replicated state.

Apache Ratis could be used in any Java application where state should be replicated between multiple instances.


Pluggable transport

Ratis provides a pluggable transport layer. By default gRPC, Netty+Protobuf and Apache Hadoop RPC based transports are provided.

Pluggable state machine

Ratis supports a log and state machine. State machine typically contains the data that you want to make highly avialable. Ratis makes it easy to use your own state machine.

Pluggable raft log

RAFT log is also pluggable, users can provide their own log implementation. The default implementation stores log in local files.

Application can define the polices of how to write data and where it should be written easily.

Log Service

Ratis provides a log service recipe provides StateMachines to implement a distributed log service with a focused client API. For more information, please read the LogService documentation.

Latest news

Posts 2020 Feb 4


Apache Ratis is a Java library that can be used directly from your applications.

It is released as source code tarballs. The downloads are distributed via mirror sites and should be checked for tampering using GPG or SHA-256

The source tarball contains detailed instruction about how can it be built.

The binaries are also uploaded to the maven central for convenience. (See the getting started guide for more details)

Version Release date Link Announcement
0.5.0 2020 Feb 4 https://www.apache.org/dist/incubator/ratis/0.5.0/ Announcement
0.4.0 2019 Sep 12 https://www.apache.org/dist/incubator/ratis/0.4.0/ Announcement
0.3.0 2019 Apr 21 https://www.apache.org/dist/incubator/ratis/0.3.0/ Announcement
0.2.0 2018 Jul 15 https://www.apache.org/dist/incubator/ratis/0.2.0/ Announcement

Release artifacts are signed with one of the keys available at: https://www.apache.org/dist/incubator/ratis/KEYS

Ratis is also available from the Maven central repository.

Getting started

Ratis is a Raft protocol library in Java. It's not a standalone server application like Zookeeper or Consul.


To demonstrate how to use Ratis from the code, Please look at the following examples.

  • Arithmetic example: This is a simple distributed calculator that replicates the values defined and allows user to perform arithmetic operations on these replicated values.

  • FileStore example: This is an example of using Ratis for reading and writing files.

The source code of the examples could be found in the ratis-examples sub-project.

Maven usage

To use in our project you can access the latest binaries from maven central:


You also need to include one of the transports:


Please note that Apache Hadoop dependencies are shaded, so it's safe to use hadoop transport with different versions of Hadoop.


Mailing list


If you'd like to contribute to Apache Ratis, please subscribe to the Ratis developer mailing list.

The Ratis developer mailing list is: dev@ratis.incubator.apache.org.


The user@ mailing list is the preferred mailing list for end-user questions and discussion.

Please use dev mailing list to address developers on a specific technical question.

The Ratis user mailing list is: user@ratis.incubator.apache.org.

To post to the list, it is necessary to subscribe to it.


There is also a slack instance for discussion at https://apacheratisdev.slack.com. Please write to the mailing list if you need an invite.


Source code is part of every release, you can download the source bundles from download section and build the project according to the included instructions.

The versioned source code history is available from the Apache git repository or from the github mirror. It is only for development and not intended for use by the general public. Only the source code from the released artifacts are checked by the Project Management Committee.


Are you interested in learning more about Apache Ratis? Excellent! Here are some resources.