Raft consensus,
embedded in your app.

Fault-tolerant replication as a library. No separate cluster to run.

Think SQLite, but for keeping several servers in agreement. Consensus and replication only. Not a database.

cargo add d-engineView on GitHub

Not on Rust? Run it as a standalone service over gRPC.

One process instead of another cluster

Typical: external coordination service

Your app→ network →etcd / ZooKeeper cluster

Deploy it. Operate it. Monitor it. Upgrade it.

d-engine: embedded

Your app+ d-engine

One process. One binary. Calls are in-process.

Kill one node. The other two keep serving.

A 3-node d-engine cluster keeps serving after one node is killed

Is it for you?

Use it if

You want leader election, replication, service discovery or configuration consistency inside your own service, without running another cluster.

Build on it if

You need a specific database or state machine that is replicated and fault-tolerant. d-engine provides consensus and replication; you plug in the storage. d-lmdb is a distributed LMDB built this way.

LanguageEmbedded (in-process)Standalone (gRPC)
RustAvailableAvailable
Go, Java, Python, ...Planned (C ABI)Available

Hello World

use d_engine::prelude::*;
use std::time::Duration;

#[tokio::main]
async fn main() {
    let engine = DefaultEmbeddedEngine::start("./data").await.unwrap();
    engine.wait_ready(Duration::from_secs(5)).await.unwrap();

    let client = engine.client();
    client.put(b"hello".to_vec(), b"world".to_vec()).await.unwrap();
    let value = client.get_linearizable(b"hello".to_vec()).await.unwrap();

    println!("{}", String::from_utf8_lossy(&value.unwrap()));
    engine.stop().await.unwrap();
}

Scale to 3 nodes: three-nodes-embedded example.

Running this in production? Talk to us → contact@deventlab.com

Performance, measured against etcd

Embedded mode, 100 requests in flight, 256 B values. AWS us-east-1, 3 × c5.2xlarge, gp3 disk. d-engine against etcd v3.7.2 on the same instance shape. Every acknowledged write is synced to disk first, as in etcd.

Caseetcd (ops/s)d-engine (ops/s)d-engine ÷ etcd
Write, 1 in flight6058361.38×
Write, 100 in flight10,06419,8601.97×
Linearizable read64,071368,0685.74×
Eventual read (etcd: serializable)148,7091,253,6508.43×

d-engine lets you swap the storage engine, and different engines perform differently. These numbers use the raft-engine log store. Embedded calls skip serialization and the network, so the read ratios measure that, not only the engine. Three rounds per case on different instances of the same shape; treat ratios as indicative, about ±20%. Standalone (gRPC) results and other storage engines are in the full report.

Correctness

Tested with Jepsen: 5 workloads and a 6-hour soak under combined kill, partition and pause faults. Every commit waits for a physical fdatasync before it is acknowledged. Read the guarantees.

Built on d-engine

d-lmdb Experimental

A distributed LMDB built on d-engine. Read the post.