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.
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.
Go and Python clients also available — see all SDKs.
Trusted in production at
No connection pool to tune, no consensus to configure. The client finds the leader and follows it through elections automatically.
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.
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
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.
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.
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.
Pin replicas to regions and let learners serve low-latency local reads. Witness nodes break ties without storing a full copy of the data.
Read keys, check invariants, write atomically. Mesh tracks the read set and aborts on conflict — the client retries the closure for you.
Subscribe to a key or a prefix and receive an ordered stream of changes — no polling. Watches resume from a revision after a reconnect.
Keys sort lexicographically, so prefix and bounded scans are native. Paginate large ranges with a cursor — no full table read.
Tolerate one node down with three; two down with five. No Zookeeper, no config server — the cluster is the quorum.
First-class builds for arm64 and x86-64. Run a dev cluster on a Raspberry Pi rack; run production on Graviton. Identical binary behavior.
No JVM, no sidecars, no shared libraries. An 18 MB statically linked binary — the server and the CLI are the same file.
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.
Pull mesh-server from crates.io. It is one statically linked file — server and CLI in the same binary.
Start three processes that know each other's addresses. They elect a leader through Raft and report ready.
From the client, put a value and read it back. It is now replicated across all three nodes.
import { connect } from '@mesh/client' const mesh = await connect(['localhost:7700']) await mesh.put('hello', 'world') console.log(await mesh.get('hello')) // -> world
Throughput measured on a 5-node cluster, c7g.2xlarge, 50/50 read-write, 256-byte values.
Sustained ops throughput
P99 write latency
Production deployments tracked
Median leader failover
ops/s by cluster size
Five nodes is the throughput sweet spot — beyond it, replication fan-out costs more than it adds.
A 5-node cluster — the leader streams the log to every follower.
threads — design RFCs, help, and release notes
members — maintainers active daily
members in #mesh:matrix.org
Sasha Korin
@skorin · lead
Rafael Antunes
@rantunes · raft
Mira Nakamura
@mirank · storage
ديانا عثمان
@dosman · clients
Mesh is independent and unfunded — sponsorship keeps the maintainers shipping.
Become a sponsorOrganization sponsors
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.
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.
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.
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.
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.
Install the server, bootstrap three nodes, write your first key. No account, no signup — just cargo install and go.