ForestDB

maintenance

by Couchbase · since 2013

Couchbase's HB+-trie key-value storage library; no longer actively developed.

key-valueembedded libraryopen source (permissive)legacy

maintenance. Couchbase says ForestDB is no longer under active development; it receives only build fixes (latest 2024) because it is still part of the Couchbase Server build.

Overview

ForestDB is an embeddable key-value storage library from Couchbase whose main index is an HB+-trie: a trie of small B+-trees keyed on fixed-size chunks of the key, which keeps lookups shallow even for long keys. It combines an append-only file with a write-ahead log and an in-memory WAL index, and offers MVCC snapshots, rollback to an earlier commit, iteration by key or sequence number and per-file compaction. The design was published in IEEE Transactions on Computers and reached v1.2 in June 2016. Couchbase now states in its commits that ForestDB is not under active development; it is still compiled as part of the Couchbase Server build, so only build fixes land. Use it to study the HB+-trie, not for new systems.

Strengths & trade-offs

Strengths

  • +HB+-trie keeps index depth low for long, variable-length keys
  • +MVCC snapshots and rollback to a previous commit point
  • +Iterate by key range or by sequence number
  • +Peer-reviewed design with a public benchmark harness

Trade-offs

  • −No feature development; Couchbase only keeps it compiling
  • −Transactions offer read-committed or read-uncommitted isolation only
  • −Append-only files need compaction tuning to control space amplification
  • −Small ecosystem: no maintained bindings beyond C/C++

Great for

  • +Studying trie-of-B+-tree index designs
  • +Maintaining software that already embeds ForestDB
  • +Benchmark comparisons against LSM and B-tree engines

Think twice for

  • −New embedded storage projects
  • −Workloads needing serializable transactions

Capabilities

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

✓Transactions
✓Durable persistence
✓Compression
✓Time travel
–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
–Encryption at rest
–Role-based access
–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
Limited ACID
Consistency
Strong
Schema
Schemaless
Architecture
Embedded
Query languages
C API

Single-process library; distribution is left to the embedding system.

Deployment

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

Ecosystem

apis & protocolsC API
client languagesC, C++

Alternatives to ForestDB

Compare all→
RocksDBKey-Value48.2

Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases.

forestdb vs rocksdb →
WiredTigerKey-Value20.6

MongoDB's default storage engine: MVCC B-tree with compression and snapshot isolation.

forestdb vs wiredtiger →
LMDBKey-Value39.7

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

forestdb vs lmdb →
PebbleKey-Value5.6

Cockroach Labs' Go LSM engine, inspired by RocksDB and tuned for CockroachDB.

forestdb vs pebble →
LevelDBKey-Value33.4

Google's original small, fast LSM key-value library, now in limited-maintenance mode.

forestdb vs leveldb →
TidesDBKey-Value13.7

Young C storage-engine library: transactional LSM with MVCC, column families and TTL.

forestdb vs tidesdb →

ForestDB FAQ

What is ForestDB?

ForestDB is a key-value database by Couchbase, first released in 2013. ForestDB is an embeddable key-value storage library from Couchbase whose main index is an HB+-trie: a trie of small B+-trees keyed on fixed-size chunks of the key, which keeps lookups shallow even for long keys. It combines an append-only file with a write-ahead log and an in-memory WAL index, and offers MVCC snapshots, rollback to an earlier commit, iteration by key or sequence number and per-file compaction. The design was published in IEEE Transactions on Computers and reached v1.2 in June 2016. Couchbase now states in its commits that ForestDB is not under active development; it is still compiled as part of the Couchbase Server build, so only build fixes land. Use it to study the HB+-trie, not for new systems.

Is ForestDB open source?

Yes. ForestDB is open source. License: Apache License 2.0.

Does ForestDB support ACID transactions?

Partly. ForestDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.

Does ForestDB scale horizontally?

ForestDB 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 ForestDB?

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

What is ForestDB best for?

ForestDB is a strong fit for studying trie-of-B+-tree index designs; maintaining software that already embeds ForestDB; and benchmark comparisons against LSM and B-tree engines. Think twice for new embedded storage projects.

What are the best alternatives to ForestDB?

Common alternatives to ForestDB include RocksDB, WiredTiger, LMDB, Pebble and LevelDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is ForestDB still maintained?

ForestDB is in maintenance mode. Couchbase says ForestDB is no longer under active development; it receives only build fixes (latest 2024) because it is still part of the Couchbase Server build.

How popular is ForestDB?

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