meta/rocksdb

Data

An embeddable persistent key-value storage library for fast reads and writes on flash and RAM.

32,233
6,989
C++
GPL-2.0
13 years old

RocksDB is a C++ library that lets an application embed a persistent key-value store rather than run a separate database server. It is built for fast storage, especially SSDs, and for very large datasets: the README describes an LSM design whose tuning can trade write, read and space amplification against each other, plus multi-threaded compaction suitable for single databases holding multiple terabytes README.

What it does and how

Keys and values are stored persistently on disk and cached in RAM, with an LSM (log-structured merge) structure that batches writes and merges them in the background. The practical consequence is high write throughput and configurable read performance, at the cost of maintaining files through compaction. Because compaction is multi-threaded, one database can hold data volumes that would be awkward for a simple embedded store.

This is a building block, not a complete server: client-server behaviour, replication or query layers must be added by the application. The project's homepage and wiki are the places to check for deeper guidance project site, wiki.

How to use it

The main path is linking the library into a C++ application and using its public API; an examples directory shows basic usage examples. Callers should rely only on headers under include/: other headers are internal and may change without warning README. That matters for upgrades, because depending on internal APIs ties your code to implementation details.

RocksDB is a foundation that others have built on; it descends from Google's LevelDB LevelDB. That lineage is background, not a compatibility promise.

Requirements and limits

  • The code is C++, so using it means building or linking a native library into a C++ program. The README does not document a managed wrapper as part of the core path.
  • One database can hold multiple terabytes, but the README does not state a hard limit or supported file-system list here; verify platform specifics in the wiki.
  • Performance depends on tuning the write/read/space amplification tradeoff for your workload; the defaults are not a guarantee for every access pattern.
  • The licence is dual: GPLv2 or Apache 2.0, and you may choose either README. Check how your chosen option fits your distribution or product before adopting it.

HotRepo's take

The only recorded board observation is 32,233 stars on 2026-10-28, a single day. That is not enough to judge momentum, and star count does not indicate reliability. The concrete decision points are whether an embedded C++ library fits your architecture and whether the GPLv2/Apache 2.0 choice matches your licensing needs.

Written by AI from the project's README, updated October 28, 2026. The project's own docs are the source of truth.