bbolt

active

by etcd maintainers / CNCF · since 2017 · also known as bbolt, BoltDB, Bolt

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

key-valueembedded libraryopen source (permissive)mature

Overview

bbolt is the etcd project's fork of Ben Johnson's Bolt, a pure-Go embedded key-value store modelled on LMDB. Data lives in one memory-mapped file as a copy-on-write B+tree organised into nested buckets, with fully serializable transactions: many concurrent readers and a single writer. Because it is small, dependency-free and crash-safe, it is the storage engine under etcd (and therefore Kubernetes) and is widely used by Go tools such as Consul's Raft log store and InfluxDB 1.x. It is best for read-heavy, moderate-size data; heavy random writes are slow compared with LSM engines.

Strengths & trade-offs

Strengths

  • +Pure Go, no cgo, tiny API surface
  • +Fully serializable ACID transactions
  • +Crash-safe single-file storage with nested buckets
  • +Proven as the backend of etcd and Kubernetes

Trade-offs

  • −One writer at a time; random writes are slow
  • −File does not shrink without offline compaction
  • −Whole database is memory-mapped, so very large files strain address space and page cache
  • −Go-only

Great for

  • +Embedded metadata stores in Go services
  • +Raft log and snapshot storage
  • +Local state for CLIs and agents

Think twice for

  • −Write-heavy workloads
  • −Large datasets beyond tens of GB
  • −Non-Go applications

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
Schemaless
Architecture
Embedded
Query languages
Go API

Single file; comfortable into tens of GB, beyond which write and compaction behaviour degrades.

Deployment

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

Ecosystem

apis & protocolsGo API
client languagesGo

Alternatives to bbolt

Compare all→
BadgerKey-Value10.7

Pure-Go LSM key-value store that separates keys from values to cut write amplification.

bbolt vs badger →
PebbleKey-Value5.6

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

bbolt vs pebble →
LMDBKey-Value39.7

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

bbolt vs lmdb →
redbKey-Value13.8

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

bbolt vs redb →
NutsDBKey-Value3.6

Pure-Go embedded key-value store with Bitcask storage and Redis-like lists, sets and sorted sets.

bbolt vs nutsdb →
cdbKey-Value3.5

D. J. Bernstein's constant database: immutable on-disk hash tables with two-read lookups and atomic swaps.

bbolt vs cdb →

bbolt FAQ

What is bbolt?

bbolt is a key-value database by etcd maintainers / CNCF, first released in 2017. bbolt is the etcd project's fork of Ben Johnson's Bolt, a pure-Go embedded key-value store modelled on LMDB. Data lives in one memory-mapped file as a copy-on-write B+tree organised into nested buckets, with fully serializable transactions: many concurrent readers and a single writer. Because it is small, dependency-free and crash-safe, it is the storage engine under etcd (and therefore Kubernetes) and is widely used by Go tools such as Consul's Raft log store and InfluxDB 1.x. It is best for read-heavy, moderate-size data; heavy random writes are slow compared with LSM engines.

Is bbolt open source?

Yes. bbolt is open source. License: MIT License.

Does bbolt support ACID transactions?

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

Does bbolt scale horizontally?

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

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

What is bbolt best for?

bbolt is a strong fit for embedded metadata stores in Go services; raft log and snapshot storage; and local state for CLIs and agents. Think twice for write-heavy workloads.

What are the best alternatives to bbolt?

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

How popular is bbolt?

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