redb

active

by Christopher Berner · since 2021

Pure-Rust embedded key-value store: copy-on-write B-trees, ACID, and a stable file format.

key-valueembedded libraryopen source (permissive)growing

Overview

redb is an embedded key-value database written entirely in Rust, inspired by LMDB: data lives in copy-on-write B-trees in a single file, readers get MVCC snapshots without blocking the single writer, and commits are crash-safe. Its typed table API (keys and values as Rust types) and savepoints make it feel native in Rust code, and the file format has been declared stable since 1.0, with the 4.x line current in 2026. It is a good default for Rust applications that want a dependency-free, transactional local store; LSM engines like Fjall are better for write-heavy loads.

Strengths & trade-offs

Strengths

  • +Pure Rust with zero unsafe-heavy C dependencies
  • +Fully ACID with MVCC: readers never block the writer
  • +Typed tables and multimap tables in a natural Rust API
  • +Stable file format with upgrade paths between major versions
  • +Savepoints and crash safety without a separate WAL

Trade-offs

  • −Single writer at a time
  • −Write throughput below LSM engines for heavy random writes
  • −Essentially a one-maintainer project
  • −Rust-first; other language bindings are minimal

Great for

  • +Local persistence for Rust desktop and CLI apps
  • +Embedded metadata and index storage in Rust services
  • +Replacing sled or LMDB bindings in Rust code

Think twice for

  • −Write-heavy ingestion
  • −Non-Rust applications
  • −Distributed or networked access

Capabilities

Native or official first-party support · 2 of 25 tracked

✓Transactions
✓Durable persistence
–Joins
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–In-memory
–Compression
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Strict
Architecture
Embedded
Query languages
Rust API

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsRust API
client languagesRust, Python

Alternatives to redb

Compare all→
FjallKey-Value15.4

Log-structured, embeddable key-value engine in pure Rust with keyspaces and transactions.

redb vs fjall →
sledKey-Value13.3

Ambitious lock-free embedded Rust database whose 1.0 rewrite has stalled in alpha.

redb vs sled →
LMDBKey-Value39.7

Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026.

redb vs lmdb →
bboltKey-Value11.5

etcd's maintained fork of BoltDB: a simple, pure-Go B+tree store in a single file.

redb vs bbolt →
SQLiteRelational75.5

The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.

redb vs sqlite →
libmdbxKey-Value4.9

Heavily reworked LMDB descendant: memory-mapped ACID B+tree with auto-growing files.

redb vs libmdbx →

redb FAQ

What is redb?

redb is a key-value database by Christopher Berner, first released in 2021. redb is an embedded key-value database written entirely in Rust, inspired by LMDB: data lives in copy-on-write B-trees in a single file, readers get MVCC snapshots without blocking the single writer, and commits are crash-safe. Its typed table API (keys and values as Rust types) and savepoints make it feel native in Rust code, and the file format has been declared stable since 1.0, with the 4.x line current in 2026. It is a good default for Rust applications that want a dependency-free, transactional local store; LSM engines like Fjall are better for write-heavy loads.

Is redb open source?

Yes. redb is open source. License: MIT or Apache License 2.0.

Does redb support ACID transactions?

Yes. redb supports full ACID transactions, with strong consistency.

Does redb scale horizontally?

redb does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run redb?

You can self-host it and embed it in your application.

What is redb best for?

redb is a strong fit for local persistence for Rust desktop and CLI apps; embedded metadata and index storage in Rust services; and replacing sled or LMDB bindings in Rust code. Think twice for write-heavy ingestion.

What are the best alternatives to redb?

Common alternatives to redb include Fjall, sled, LMDB, bbolt and SQLite. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is redb?

redb ranks #245 of 844 databases on the WhichDB Score (13.8/100), and #31 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.