# sofastack/sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.

Repository: https://github.com/sofastack/sofa-jraft
Canonical: https://ross.abutalabs.com/products/sofa-jraft
Homepage: https://www.sofastack.tech/projects/sofa-jraft/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: raft-algorithm, raft-java, raft, sofastack, sofa-jraft, sofa-bolt, distributed-consensus-algorithms, java, consensus
Last push: 2026-06-16T09:42:56+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 87, release rhythm 57, longevity 100
- inputs: {"age_days": 2739, "days_push": 78, "days_rel": 79, "gap_med": 336, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3817, forks 1199 (observed 2026-08-28T04:08:20.963000+00:00)

## What it is
SOFAJRaft is a production-grade, high-performance Java implementation of the RAFT consensus algorithm, ported from Baidu's braft. It supports multi-raft-group deployment for high-load, low-latency scenarios and includes an embedded distributed KV storage implementation.

## Use cases
- build a replicated state machine in Java
- implement a fault-tolerant distributed key-value store
- add leader election and log replication to a distributed system
- achieve linearizable reads with ReadIndex or lease-based reads
- run multiple raft groups for high-throughput sharded storage
- verify cluster consistency under network partitions

## When to choose
- you need a battle-tested, Jepsen-verified RAFT implementation on the JVM
- you want snapshotting, log compaction, and membership changes out of the box
- you need multi-raft-group support for high-load, low-latency workloads
- you prefer a pure Java library with Maven Central availability

## When to avoid
- you need a C++ or non-JVM RAFT implementation
- you only need a simple single-node storage solution without replication
- your project requires a language other than Java or JVM compatibility

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, developer-tools, sdk
- domain: microservices, databases, developer-tools
- platform: jvm, windows, cross-platform
- tags: raft, consensus, replication, multi-raft, jepsen-tested, distributed-storage, high-availability, algorithms, linux, macos

## Member repositories
- sofastack/sofa-jraft (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:20.963000+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:32.076915+00:00, confidence not recorded.
  - readme: https://github.com/sofastack/sofa-jraft (fetched 2026-08-28T04:08:20.963000+00:00, sha 8293b4125f12)
  - homepage: https://www.sofastack.tech/projects/sofa-jraft/ (fetched 2026-08-29T09:21:20.829936+00:00, sha 44136fa355b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
