TerarkDB

maintenance

by ByteDance (originally Terark) · since 2016 · also known as Terark DB

ByteDance's RocksDB-compatible key-value engine built around Terark's searchable compression.

key-valueembedded libraryopen source (permissive)mature

maintenance. No tagged release since 1.3.6 (January 2021); the repo receives only occasional build and doc fixes. RocksDB or Speedb are more actively maintained.

Overview

TerarkDB began at the Chinese startup Terark, whose searchable compression lets the engine serve point and range reads directly from compressed data, and continued at ByteDance after it took over the technology. Forked from RocksDB 5.18.3 and open-sourced under Apache 2.0 in December 2020, it keeps RocksDB's API while adding the TerarkZipTable SST format and compaction changes aimed at lower tail latency and better compression, with published benchmarks against RocksDB 6.12. It is production-tested only on Linux, and data migrated from RocksDB cannot be moved back. The last tagged release is 1.3.6 (January 2021) and the repository now gets only occasional fixes.

Strengths & trade-offs

Strengths

  • +Drop-in RocksDB API, so existing RocksDB applications can switch
  • +Searchable compression serves reads from compressed data
  • +Published benchmarks show better throughput and tail latency than RocksDB 6.12 on heavy writes
  • +Used inside ByteDance, which tuned it for tail latency

Trade-offs

  • −Forked from an old RocksDB release and lags upstream features
  • −Linux-only for production; bindings beyond C/C++ are not fully tested
  • −One-way migration: data cannot go back to RocksDB
  • −Little release activity since 2021

Great for

  • +Replacing RocksDB where tail latency and compression matter
  • +Storage engine for large key-value services on Linux

Think twice for

  • −Teams that need upstream RocksDB features and fixes
  • −Non-Linux deployments

Capabilities

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

✓Transactions
✓Durable persistence
✓Compression
–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
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Medium · ≤ 10 TB
Horizontal scaling
None
Multi-region
No
Transactions
Limited ACID
Consistency
Strong
Schema
Schemaless
Architecture
Embedded
Query languages
RocksDB-compatible C++ API

Embedded single-node engine; distribution is up to the system built on top.

Deployment

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

Ecosystem

client languagesC++, C, Java

Alternatives to TerarkDB

Compare all→
RocksDBKey-Value48.2

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

terarkdb vs rocksdb →
SpeedbKey-Value2.3

RocksDB-compatible storage engine fork; open-source development stopped after Redis bought it in 2024.

terarkdb vs speedb →
PebbleKey-Value5.6

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

terarkdb vs pebble →
LevelDBKey-Value33.4

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

terarkdb vs leveldb →
WiredTigerKey-Value20.6

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

terarkdb vs wiredtiger →
TidesDBKey-Value13.7

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

terarkdb vs tidesdb →

TerarkDB FAQ

What is TerarkDB?

TerarkDB is a key-value database by ByteDance (originally Terark), first released in 2016. TerarkDB began at the Chinese startup Terark, whose searchable compression lets the engine serve point and range reads directly from compressed data, and continued at ByteDance after it took over the technology. Forked from RocksDB 5.18.3 and open-sourced under Apache 2.0 in December 2020, it keeps RocksDB's API while adding the TerarkZipTable SST format and compaction changes aimed at lower tail latency and better compression, with published benchmarks against RocksDB 6.12. It is production-tested only on Linux, and data migrated from RocksDB cannot be moved back. The last tagged release is 1.3.6 (January 2021) and the repository now gets only occasional fixes.

Is TerarkDB open source?

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

Does TerarkDB support ACID transactions?

Partly. TerarkDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.

Does TerarkDB scale horizontally?

TerarkDB does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at medium scale (≤ 10 TB).

How can I run TerarkDB?

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

What is TerarkDB best for?

TerarkDB is a strong fit for replacing RocksDB where tail latency and compression matter; and storage engine for large key-value services on Linux. Think twice for teams that need upstream RocksDB features and fixes.

What are the best alternatives to TerarkDB?

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

Is TerarkDB still maintained?

TerarkDB is in maintenance mode. No tagged release since 1.3.6 (January 2021); the repo receives only occasional build and doc fixes. RocksDB or Speedb are more actively maintained.

How popular is TerarkDB?

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