v0.12 · Released Mar 14, 2026 · MIT

Distributed K/V without the operational tax.

Mesh is a replicated key/value store with Raft built in — transactions, watches, and range queries in one static binary. Three nodes, no Zookeeper, sane defaults.

Terminal — install
$ cargo install mesh-server
$ npm install @mesh/client

Go and Python clients also available — see all SDKs.

Stars over 18 months +14.4k

Trusted in production at

Northwind Coilbase Helix Brightpath Quanta stream/io Drift Lumenly Pebble Vantix
The client API

Connect, write, watch — in twelve lines.

No connection pool to tune, no consensus to configure. The client finds the leader and follows it through elections automatically.

client.ts
1import { connect } from '@mesh/client'
2
3// the client tracks the leader through elections
4const cluster = await connect(['10.0.0.1:7700', '10.0.0.2:7700', '10.0.0.3:7700'])
5
6await cluster.put('user:1042', { name: 'Ada', tier: 'pro' })
7const user = await cluster.get('user:1042')
8
9// stream every change to a key
10const watcher = cluster.watch('user:1042')
11watcher.on('change', (ev) => console.log('updated ->', ev.value))
12
13// optimistic transaction — retried on conflict
14await cluster.txn(async (tx) => {
15  const seats = await tx.get('org:9:seats')
16  if (seats.count >= seats.limit) throw new Error('seat limit reached')
17  await tx.put('org:9:seats', { ...seats, count: seats.count + 1 })
18})

The same five primitives exist verbatim in the Go, Python, and Rust clients.

Why Mesh exists

There's a gap between Redis and a real database.

Mesh lives in that gap on purpose. It is bigger than a cache and far smaller than a SQL cluster — the shape most teams actually reach for.

// the sweet spot

Redis Mesh CockroachDB

etcd, Consul, and FoundationDB are overkill for roughly 80% of the systems that reach for them. They were built for the hardest coordination problems on earth, and they carry that weight everywhere: an external quorum to babysit, a Zookeeper-shaped learning curve, ops runbooks measured in pages. If you are not running a control plane for a fleet, you are paying a tax you will never use.

Redis, even with persistence turned on, is the wrong model the moment you need replication and transactions. AOF and RDB are durability bolted onto a single-process cache; Sentinel and Cluster are failover bolted onto that. It works until a partition, a failover, or a multi-key invariant exposes that there was never a consensus log underneath — and by then it is load-bearing.

Mesh is the boring middle, and that is the whole pitch. One static binary you can scp and run. A three-node minimum that elects a leader and replicates through Raft with no external coordinator. Transactions, watches, and range queries are first-class, not add-ons. Defaults that are correct on a fresh cluster — you tune Mesh when you have a reason, never just to make it start.

Things Mesh deliberately does not do

No SQL or query planner. It is a key/value store with range scans, not a relational database. If you need joins, you need Postgres.

No external coordination service. Mesh runs its own Raft. There is no Zookeeper, no separate quorum to operate.

No tunable consistency knobs. Reads and writes are linearizable. We do not ship an eventual-consistency mode for you to misconfigure.

No plugin runtime or stored procedures. No Lua, no server-side scripting. Logic lives in your application.

No values over 8 MiB. Mesh is not a blob store. Large objects belong in S3 with the key pointing at them.

No hosted control panel. Mesh is software you run. There is no SaaS upsell hiding behind the open-source label.

What's in the binary

Everything a replicated store needs. Nothing it doesn't.

Built-in Raft replication

Every write goes through a Raft log replicated to a majority before it commits. Leader elections are automatic and finish in well under a second.

commit_quorum = majority

Multi-region clusters

Pin replicas to regions and let learners serve low-latency local reads. Witness nodes break ties without storing a full copy of the data.

--region=eu-west --witness

Optimistic transactions

Read keys, check invariants, write atomically. Mesh tracks the read set and aborts on conflict — the client retries the closure for you.

cluster.txn(async tx => …)

Watches

Subscribe to a key or a prefix and receive an ordered stream of changes — no polling. Watches resume from a revision after a reconnect.

cluster.watch('cfg/', { since })

Range queries

Keys sort lexicographically, so prefix and bounded scans are native. Paginate large ranges with a cursor — no full table read.

cluster.range('user:', 'user:~')

Three-node minimum

Tolerate one node down with three; two down with five. No Zookeeper, no config server — the cluster is the quorum.

mesh-server --join node-a,node-b

ARM and x86

First-class builds for arm64 and x86-64. Run a dev cluster on a Raspberry Pi rack; run production on Graviton. Identical binary behavior.

linux/arm64 · linux/amd64

Single static binary

No JVM, no sidecars, no shared libraries. An 18 MB statically linked binary — the server and the CLI are the same file.

ldd $(which mesh-server) # not a dynamic
Where Mesh fits

The honest comparison.

Each of these is excellent at what it was built for. The question is only whether you need what it costs.

Capability
Mesh
etcd Consul KV Redis+ persistence
Operational simplicity excellent heavy heavy good
Multi-region built in add-on
Native range queries prefix only
Multi-key transactions compare-only CAS-only MULTI/EXEC
Watches / change streams pub/sub
External coordination service none self-hosts quorum self-hosts quorum Sentinel
Single static binary

Comparison reflects default out-of-the-box configuration as of Mar 2026. Corrections welcome via PR.

Quick start

A live three-node cluster in under 60 seconds.

1

Install the binary

Pull mesh-server from crates.io. It is one statically linked file — server and CLI in the same binary.

install.sh
$ cargo install mesh-server
Installed mesh-server v0.12.0 (18.4 MB)
2

Bootstrap three nodes

Start three processes that know each other's addresses. They elect a leader through Raft and report ready.

cluster.sh
$ mesh-server --node a --listen :7700 --peers b,c
$ mesh-server --node b --listen :7701 --peers a,c
$ mesh-server --node c --listen :7702 --peers a,b
raft: node 'a' elected leader (term 1) — cluster ready
3

Write your first key

From the client, put a value and read it back. It is now replicated across all three nodes.

hello.ts
import { connect } from '@mesh/client'
const mesh = await connect(['localhost:7700'])
await mesh.put('hello', 'world')
console.log(await mesh.get('hello')) // -> world

Numbers from the field.

Throughput measured on a 5-node cluster, c7g.2xlarge, 50/50 read-write, 256-byte values.

0/s

Sustained ops throughput

1.18ms

P99 write latency

0

Production deployments tracked

0.34s

Median leader failover

ops/s by cluster size

3-node
112k
5-node
184k
7-node
142k

Five nodes is the throughput sweet spot — beyond it, replication fan-out costs more than it adds.

Raft replication topology

live

A 5-node cluster — the leader streams the log to every follower.

Leader Follower Replication
Community

Built in the open, answered fast.

Core maintainers

+ 148 contributors across 31 countries
SK

Sasha Korin

@skorin · lead

RA

Rafael Antunes

@rantunes · raft

MN

Mira Nakamura

@mirank · storage

DO

ديانا عثمان

@dosman · clients

Mesh is independent and unfunded — sponsorship keeps the maintainers shipping.

Become a sponsor
GitHub Sponsors

Funded by the teams who run it.

Organization sponsors

Cloudflare
Fly.io
Vercel

Individual sponsors

28 people chipping in monthly
TV AL KW PR LB SM IB HO MR YT GL OH NK DS EK PM WC TH +10
FAQ

The questions we get most.

Is Mesh production-ready?

Yes, with a clear-eyed view of the version. Mesh is v0.12 — the on-disk format and the wire protocol are stable and we will not break them without a migration path, and 1,408 clusters report production telemetry today. What v0.x signals is that the client API surface may still gain methods before 1.0. Mesh runs continuous Jepsen-style partition testing on every release and the storage layer is fuzzed against power-loss injection. Run three or five nodes, keep one version behind the bleeding edge, and it is a sound choice for service discovery, feature flags, leader election, and configuration.

How does failover work during a network partition?

Mesh follows Raft strictly, so it always favors consistency over availability. During a partition only the side holding a majority quorum can elect a leader and accept writes — in a five-node cluster split 3/2, the minority side rejects writes and serves only stale reads it explicitly labels as such. The majority side keeps a leader the whole time; if it was the old leader that got isolated, it steps down within an election timeout. When the partition heals, the stale nodes catch up from the leader's log and rejoin. There is no split-brain and no divergent history — a write that was acknowledged stays acknowledged. Median observed failover is 0.34s.

What's the realistic throughput ceiling?

On a five-node c7g.2xlarge cluster with 256-byte values and a 50/50 read-write mix, Mesh sustains about 184k ops/s with a 1.18ms P99 on writes. Reads served by the leader are linearizable; reads served by followers are bounded-staleness and scale roughly with node count. The ceiling on writes is the Raft commit path — every write needs a majority fsync — so write throughput is gated by your slowest disk and your cross-node RTT, not by CPU. Mesh is built for high-frequency small values, not for pushing gigabytes; if you are saturating it, you are likely storing values that belong in object storage.

What's the backup and restore story?

mesh snapshot writes a consistent point-in-time image of the keyspace at a known Raft revision — it is safe to run against a live cluster and streams straight to a file or to S3-compatible storage. Restore is mesh restore into a fresh cluster, which replays the snapshot and resumes. For continuous protection, point-in-time recovery ships the Raft log segments after the last snapshot, so you can roll forward to any revision. Snapshots are content-addressed and incremental, so a daily backup of a steady cluster is cheap. We recommend a nightly snapshot plus log shipping; full disaster recovery of a 10 GB keyspace restores in a few minutes.

How does Mesh compare to FoundationDB?

FoundationDB is a genuinely remarkable piece of engineering and, for the very hardest distributed-storage problems, it is more capable than Mesh — strict-serializable transactions across an enormous keyspace, a deterministic simulation test suite that is the gold standard of the field. It is also a multi-process system with distinct roles (coordinators, storage, transaction logs, proxies) that you size and operate as a unit. Mesh trades that ceiling for an operational floor: one binary, three-node minimum, no roles to plan. If you are building a database or a platform on top of an ordered transactional store, reach for FoundationDB. If you need a replicated K/V store for configuration, coordination, and small stateful data — and you want to run it without a dedicated team — that is exactly the seam Mesh is cut for.

More questions? Ask in GitHub Discussions or the Discord.

Get started in 60 seconds.

Install the server, bootstrap three nodes, write your first key. No account, no signup — just cargo install and go.

Terminal
$ cargo install mesh-server