rocksdb is a free, open source databases project written in C++ and released under GPL-2.0. It has 32,106 GitHub stars, 6,930 forks and 1,645 open issues, and was last pushed 5 hours ago. On this registry it ranks #13 of 81 tracked projects in Databases, with 5 head-to-head comparisons available. It gained 6 stars over the last 3 tracked days.

What is rocksdb?

What it is

RocksDB is an embeddable, persistent key-value store written in C++ and developed by the Facebook Database Engineering Team. It is a library rather than a standalone server, and it forms the core building block for a fast key-value server. The project builds on earlier work on LevelDB by Sanjay Ghemawat and Jeff Dean, and it lives in the systems infrastructure and database ecosystem, carrying the topics database and storage-engine. It has been public for roughly fourteen years and is dual-licensed under GPLv2 and Apache 2.0, so a user may select either license at their option.

The concrete problem it solves is fast persistent storage on flash drives and in RAM. RocksDB uses a Log-Structured-Merge-Database design that exposes flexible tradeoffs between the Write-Amplification-Factor, the Read-Amplification-Factor and the Space-Amplification-Factor. Multi-threaded compactions let a single database hold multiple terabytes of data. Applications that need a key-value engine inside their own process, rather than a separate network service, embed this library and tune those amplification tradeoffs to match their workload.

Key capabilities

  • Log-Structured-Merge-Database design with tunable tradeoffs between write, read and space amplification.
  • Multi-threaded compactions that support storing multiple terabytes of data in a single database.
  • Embeddable library form, so the store runs inside the calling process rather than as a separate server.
  • Persistent key-value storage optimized for flash drives and RAM.
  • Stable public interface confined to the include/ directory.
  • Example usage code published in the repository's examples directory.
  • Dual licensing under GPLv2 and Apache 2.0, selectable at the user's option.

Who uses it and how

  • Developers building a fast key-value server who need a storage engine as a core building block.
  • Applications that embed the library directly and call the public headers in include/.
  • Workloads that store multiple terabytes in one database and rely on multi-threaded compaction.
  • Teams tuning write, read and space amplification factors for their specific storage hardware.
  • Users who consult the GitHub wiki, the examples directory, the Facebook developers group or the Google Groups email list for guidance.

Getting started

The README points to the example usage code in the examples directory of the repository and to the GitHub wiki for further explanation. No package manager, Docker image or hosted option is listed in the provided facts, so the documented path is to build and link the library from source.

When to use it — and when not to

RocksDB suits projects that want an embedded storage engine and are willing to tune amplification tradeoffs themselves. A self-hoster must build and link a C++ library rather than deploy a managed service, and the README warns that only the headers in include/ are public, since internal APIs may change without warning. The project also carries a large open issue count, which is worth weighing against the maturity implied by fourteen years of development.

project readme (upstream, from github) — read inline

RocksDB: A Persistent Key-Value Store for Flash and RAM Storage

CircleCI Status

RocksDB is developed and maintained by Facebook Database Engineering Team. It is built on earlier work on LevelDB by Sanjay Ghemawat ([email protected]) and Jeff Dean ([email protected])

This code is a library that forms the core building block for a fast key-value server, especially suited for storing data on flash drives. It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) and Space-Amplification-Factor (SAF). It has multi-threaded compactions, making it especially suitable for storing multiple terabytes of data in a single database.

Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples

See the github wiki for more explanation.

The public interface is in include/. Callers should not include or rely on the details of any other header files in this package. Those internal APIs may be changed without warning.

Questions and discussions are welcome on the RocksDB Developers Public Facebook group and email list on Google Groups.

License

RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.

Frequently asked questions

Is rocksdb free to use?

rocksdb is open source under the GPL-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does rocksdb do?

A library that provides an embeddable, persistent key-value store for fast storage.

What is rocksdb written in?

rocksdb is primarily written in C++. Its source is publicly available at https://github.com/facebook/rocksdb, and it has 32,106 GitHub stars.