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 GitHubNot on Rust? Run it as a standalone service over gRPC.
One process instead of another cluster
Typical: external coordination service
Deploy it. Operate it. Monitor it. Upgrade it.
d-engine: embedded
One process. One binary. Calls are in-process.
When d-engine says “success”, the write survives.
Even if power is cut on the very nodes that hold it. Follow one write through a 3-node cluster.
- Your app sends a write.
- The leader and Node 2 save it to disk.
- 2 of 3 on disk. Only now: success.
- Power is cut on both nodes that have it.
- They reboot from disk. Node 3 catches up.
Not promised. A write that timed out or errored may or may not have happened: check before you retry. Losing the disks of 2 of 3 nodes at once can lose the write.
Check it yourself. Jepsen: 5 workloads and a 6-hour soak under kill, partition and pause. For power loss it cuts power to the leader and one follower every 5 seconds, dropping unflushed data: 3 of 3 runs pass. Read the guarantees
Kill one node. The other two keep serving.
A 3-node cluster loses one node. The other two keep accepting reads and writes.

This section shows only what has been tested so far. d-engine is built to keep more promises than are shown here; each one appears here once it is verified. The full list of d-engine guarantees, with the test status of each, is coming soon.
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.
| Language | Embedded (in-process) | Standalone (gRPC) |
|---|---|---|
| Rust | Available | Available |
| 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.
| Case | etcd (ops/s) | d-engine (ops/s) | d-engine ÷ etcd |
|---|---|---|---|
| Write, 1 in flight | 605 | 836 | 1.38× |
| Write, 100 in flight | 10,064 | 19,860 | 1.97× |
| Linearizable read | 64,071 | 368,068 | 5.74× |
| Eventual read (etcd: serializable) | 148,709 | 1,253,650 | 8.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.
Built on d-engine
d-lmdb Experimental
A distributed LMDB built on d-engine. Read the post.