HanoiDB

discontinued

by Trifork (Kresten Krab Thorup) with Basho Technologies · since 2012

Pure-Erlang LSM B-tree storage engine from Trifork and Basho, usable as a Riak backend.

key-valueembedded libraryopen source (permissive)legacy

discontinued. Unmaintained: no commits since 2016 and Riak has moved on to other backends.

Overview

HanoiDB is an indexed key-value storage engine written in about 2,000 lines of Erlang by Trifork with Basho. Its primary index is an LSM B-tree built from levels that double in size, and merging is done incrementally on every insert, so inserts, deletes and reads have a worst-case O(log2 N) cost without background merge storms. It is append-only with CRC-checked, optionally compressed data, uses Bloom filters to skip disk lookups, supports per-key and global expiry, and gives efficient range scans for Riak secondary indexes; its level visualiser looks like the Towers of Hanoi puzzle. It plugged into Riak through riak_kv_tower_backend. The last commit was in 2016.

Strengths & trade-offs

Strengths

  • +Incremental merging gives predictable worst-case latency
  • +Pure Erlang: no NIFs to crash the BEAM VM
  • +Fast range scans and key listing for Riak 2i
  • +Append-only, checksummed files make crash recovery simple

Trade-offs

  • −Unmaintained since 2016
  • −Slower than native-code engines such as LevelDB for raw throughput
  • −Tied to old Erlang/OTP and Riak versions

Great for

  • +Studying incremental LSM merge designs
  • +Maintaining old Riak clusters that use the tower backend

Think twice for

  • −New Erlang or Elixir projects needing active support

Capabilities

Native or official first-party support · 4 of 25 tracked

✓Secondary indexes
✓TTL / expiry
✓Durable persistence
✓Compression
–Transactions
–Joins
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–Pub/Sub
–Columnar storage
–In-memory
–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
None
Consistency
Strong
Schema
Schemaless
Architecture
Embedded
Query languages
Erlang API

Single-node engine; distribution comes from Riak when used as its backend.

Deployment

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

Ecosystem

apis & protocolsErlang API
client languagesErlang

Alternatives to HanoiDB

Compare all→
LevelDBKey-Value33.4

Google's original small, fast LSM key-value library, now in limited-maintenance mode.

hanoidb vs leveldb →
RocksDBKey-Value48.2

Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases.

hanoidb vs rocksdb →
Riak KVKey-Value18.1

Erlang-based, Dynamo-style key-value store built to stay up through ugly failures.

hanoidb vs riak-kv →
PebbleKey-Value5.6

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

hanoidb vs pebble →
WiredTigerKey-Value20.6

MongoDB's default storage engine: MVCC B-tree with compression and snapshot isolation.

hanoidb vs wiredtiger →
TidesDBKey-Value13.7

Young C storage-engine library: transactional LSM with MVCC, column families and TTL.

hanoidb vs tidesdb →

HanoiDB FAQ

What is HanoiDB?

HanoiDB is a key-value database by Trifork (Kresten Krab Thorup) with Basho Technologies, first released in 2012. HanoiDB is an indexed key-value storage engine written in about 2,000 lines of Erlang by Trifork with Basho. Its primary index is an LSM B-tree built from levels that double in size, and merging is done incrementally on every insert, so inserts, deletes and reads have a worst-case O(log2 N) cost without background merge storms. It is append-only with CRC-checked, optionally compressed data, uses Bloom filters to skip disk lookups, supports per-key and global expiry, and gives efficient range scans for Riak secondary indexes; its level visualiser looks like the Towers of Hanoi puzzle. It plugged into Riak through riak_kv_tower_backend. The last commit was in 2016.

Is HanoiDB open source?

Yes. HanoiDB is open source. License: Apache License 2.0.

Does HanoiDB support ACID transactions?

No. HanoiDB does not provide ACID transactions; its consistency model is strong.

Does HanoiDB scale horizontally?

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

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

What is HanoiDB best for?

HanoiDB is a strong fit for studying incremental LSM merge designs and maintaining old Riak clusters that use the tower backend. Think twice for new Erlang or Elixir projects needing active support.

What are the best alternatives to HanoiDB?

Common alternatives to HanoiDB include LevelDB, RocksDB, Riak KV, Pebble and WiredTiger. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is HanoiDB still maintained?

HanoiDB is discontinued. Unmaintained: no commits since 2016 and Riak has moved on to other backends.

How popular is HanoiDB?

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