# dgraph-io/badger

Fast key-value DB in Go.

Repository: https://github.com/dgraph-io/badger
Canonical: https://ross.abutalabs.com/products/badger
Homepage: https://dgraph-io.github.io/badger/
Language: Go
License: Apache-2.0
License Family: permissive
Topics: key-value, golang, library, go, ssd, database, document-database
Last push: 2026-08-26T19:31:44+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 3506, "days_push": 7, "days_rel": 29, "gap_med": 31.5, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15761, forks 1313 (observed 2026-08-28T04:11:13.974528+00:00)

## What it is
BadgerDB is an embeddable, persistent, and fast key-value database written in pure Go, serving as the storage engine for Dgraph. It is designed as a performant Go-native alternative to RocksDB, optimized for SSDs and supporting concurrent ACID transactions with serializable snapshot isolation.

## Use cases
- embed a fast key-value store in a Go application
- replace RocksDB or LevelDB with a pure Go alternative
- store metadata or state for distributed systems
- build a local persistent cache with high write throughput
- persist large datasets on SSDs from a Go service
- need ACID transactions in an embedded database

## When to choose
- you are writing Go and want zero CGo dependencies
- you need an embedded KV store with ACID transactional guarantees
- your workload is write-heavy and runs on SSDs
- you want a proven store serving hundreds of terabytes in production

## When to avoid
- you need SQL queries or relational schemas
- you need a network-accessible client-server database
- your dataset must fit in memory and you prefer an in-memory store
- you need rich secondary indexes or document queries out of the box

## Facets
- artifact type: library
- maturity: stable
- function: database, caching, serialization
- domain: databases, developer-tools, backend
- platform: go, windows, cross-platform
- tags: key-value-store, embedded-database, lsmtree, pure-go, acid-transactions, ssd-optimized, linux, macos

## Member repositories
- dgraph-io/badger (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:13.974528+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:05:33.365112+00:00, confidence not recorded.
  - readme: https://github.com/dgraph-io/badger (fetched 2026-08-28T04:11:13.974528+00:00, sha 972ffc9a362b)
  - homepage: https://dgraph-io.github.io/badger/ (fetched 2026-08-29T08:03:23.636457+00:00, sha 1b022b37c3d8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
