Why MicroRaft?

MicroRaft exists for teams that want to embed consensus into a Java service without adopting a full distributed database or coordination platform.

What it is

MicroRaft is a library implementation of the Raft consensus algorithm.

  • transport
  • persistence layer
  • serialization format
  • threading model
  • state machine logic

This makes it a strong fit for custom metadata stores, control planes, coordination services, and other CP subsystems.

Why choose it

  • a lightweight embeddable dependency instead of an external cluster product
  • a modular design that does not force your transport or storage stack
  • production-oriented Raft capabilities such as snapshotting, membership changes, quorum-aware queries, pre-voting, and leadership transfer
  • explicit control over operational behavior instead of a sealed appliance

What you are signing up for

  • you will define your own transport and persistence boundaries
  • you will still need to think about operational rollout and recovery
  • you get control, but you also keep responsibility

When not to use it

  • a turnkey distributed key-value store
  • a managed lock service or service registry
  • a platform that hides consensus internals from application engineers
  • immediate multi-language client support out of the box

In those cases, a higher-level system may be a better fit than a library.

Practical decision rule

If you want an embeddable consensus core inside a Java system you already own, MicroRaft is the right shape. If you want a ready-made distributed product with fewer integration decisions, it is probably not.

Good first path

  1. Run the local tutorial flow
  2. Read Main Abstractions
  3. Follow the atomic register tutorial
  4. Review the production checklist
Open abstractions

Related answers

View use cases