nutsdb

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, s

What is nutsdb?

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

Overview of nutsdb

What it is

NutsDB is a simple, fast, embeddable persistent key/value store written in pure Go. It supports fully serializable transactions and multiple data structures including list, set, and sorted set. All operations occur inside a transaction (Tx), which can be read-only or read-write. Read-only transactions can read values for a given bucket and key or iterate over key-value pairs. Read-write transactions can read, update, and delete keys.

Key features

  • Written in pure Go, embeddable, and persistent.
  • Supports fully serializable transactions.
  • Data structures: list, set, sorted set.
  • Merge V2: a high-performance compaction algorithm that reduces memory usage by ~65% during merge operations (from ~145 bytes/entry to ~50 bytes/entry).
  • HintFile: an index persistence feature that reduces database startup time by loading persistent indexes instead of scanning full data files.
  • Concurrent writes are allowed during merge operations.

Use cases

NutsDB can be used as an embedded database in Go applications that need a local key/value store with transaction support. It is suitable for scenarios requiring reliable persistence, structured data (such as lists or sorted sets), and fast recovery after restarts. The Merge V2 and HintFile features make it particularly useful for large datasets (10GB+) and applications with frequent restarts or memory constraints.

Getting started

Install NutsDB using Go modules (Go 1.24+ required):go get -u github.com/nutsdb/nutsdbA basic usage example (opening a database):gopackage mainimport ( "log" "github.com/nutsdb/nutsdb")func main() { db, err := nutsdb.Open( nutsdb.DefaultOptions, nutsdb.WithDir("/tmp/nutsdb"), ) if err != nil { log.Fatal(err) } defer db.Close()}For more details, see the repository README.

License and pricing

License: Apache-2.0. The project is open source (pricing_type: open_source). No pricing information is stated in the provided metadata.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/nutsdbnutsdb.svg)](https://yunodb.com/tools/nutsdbnutsdb?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/nutsdbnutsdb?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/nutsdbnutsdb.svg" alt="Featured on YunoDB" height="20"></a>