RocksDB is an embeddable C++ library for a persistent key-value store tuned for flash and RAM. It suits embedded workloads, caches, and storage engines inside larger systems.
Overview
RocksDB is a persistent key-value storage library designed for fast media such as flash drives and high-speed disks. Keys and values are arbitrary byte streams, and callers embed it directly into applications or database stacks rather than running it as a standalone server.
The engine uses a log-structured merge (LSM) layout with configurable tradeoffs among write amplification, read amplification, and space amplification. Multi-threaded compaction helps it scale to very large datasets within a single database instance.
Beyond open, close, read, and write, the API exposes more advanced operations such as merge semantics and compaction filters. The public surface is limited to documented headers so downstream code avoids unstable internals.
The project positions itself for varied workloads, including integration with storage engines like MyRocks, application-level caching, and other embedded data paths. Documentation and examples describe typical integration patterns.
Key features
- Embeddable LSM key-value engine
- Configurable amplification tradeoffs
- Multi-threaded compactions
- Arbitrary byte-stream keys and values
- Merge and compaction filter operations
- Tuned for flash and fast disks
Use cases
- Embed a local key-value store in an application
- Back a database storage engine layer
- Cache application data on fast storage