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
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.