vs

Badger vs Pebble

Badger: Pure-Go LSM key-value store that separates keys from values to cut write amplification. Pebble: Cockroach Labs' Go LSM engine, inspired by RocksDB and tuned for CockroachDB.

key differences

  • Transactions: Badger offers full ACID; Pebble offers limited.
  • Only Badger has transactions, ttl / expiry, pub/sub, in-memory, time travel.

choose badger for

  • +Storage layer for Go databases and services
  • +Embedded state for Go daemons and CLIs
  • +Write-heavy local key-value workloads with medium-to-large values

best at · Embedded, OLTP, Metadata

choose pebble for

  • +Storage engine for Go databases
  • +Blockchain node state (Geth)
  • +Write-heavy embedded key-value stores in Go services

best at · Embedded, OLTP, Metadata

overview
Primary model
Key-Value
Key-Value
Also supports
–
–
Type
Embedded library
Embedded library
Status
Active
Active
Developer
Dgraph (Istari Digital)
Cockroach Labs
First release
2017
2020
Latest version
4.9.6 (Aug 5, 2026)
2.1.7 (Aug 24, 2026)
License
Open source (permissive)Apache License 2.0
Open source (permissive)BSD 3-Clause License
Free tier
✓
✓
popularity
WhichDB Score
10.7
5.6
Rank
#294
#379
GitHub stars
15.8K
6.1K
Stack Overflow questions
10
–
scale & guarantees
Comfortable data size
Medium (≤ 10 TB)
Medium (≤ 10 TB)
Horizontal scaling
None
None
Multi-region
None
None
ACID
Full
Limited
Consistency
Strong
Strong
Schema
Schemaless
Schemaless
Architecture
Embedded
Embedded
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
✓
Edge
—
—
Clouds
–
–
capabilities
Transactions
✓
—
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
✓
—
Durable persistence
✓
✓
Compression
✓
✓
Encryption at rest
✓
✓
Role-based access
—
—
Time travel
✓
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
Go API
Go API
Client languages
Go
Go
Best for
Embedded, OLTP, Metadata
Embedded, OLTP, Metadata

Badger vs Pebble: FAQ

What is the difference between Badger and Pebble?

Badger: Pure-Go LSM key-value store that separates keys from values to cut write amplification. Pebble: Cockroach Labs' Go LSM engine, inspired by RocksDB and tuned for CockroachDB. Transactions: Badger offers full ACID; Pebble offers limited. Only Badger has transactions, ttl / expiry, pub/sub, in-memory, time travel.

When should I choose Badger over Pebble?

Choose Badger for storage layer for Go databases and services; embedded state for Go daemons and CLIs; and write-heavy local key-value workloads with medium-to-large values. Choose Pebble for storage engine for Go databases, blockchain node state (Geth) and write-heavy embedded key-value stores in Go services.

Is Badger or Pebble more popular?

Badger ranks #294 on the WhichDB Score (10.7/100) and Pebble ranks #379 (5.6/100). Popularity is not fit: check the requirements that matter for your project.

Are Badger and Pebble open source?

Yes. Badger is open source. License: Apache License 2.0. Yes. Pebble is open source. License: BSD 3-Clause License.