- Home
- Key-Value Databases
- RocksDB
RocksDB
What it is
RocksDB is a free, open-source C++ library that provides an embeddable, persistent key-value store for fast storage. Keys and values are arbitrary byte arrays, and a user-specified comparator determines key order. Its log-structured merge design allows configurable tradeoffs among write, read, and space amplification; the project describes it as optimized for low-latency storage on flash drives and high-speed disks. The library supports database open and close, reads and writes, merging, and compaction filters. Described uses include database storage engines, application data caching, and embedded workloads. Multi-threaded compactions support databases storing multiple terabytes. RocksDB also has a Java wrapper, RocksJava, with Java artifacts published through Maven. Optional build dependencies include zlib, bzip2, LZ4, Snappy, and Zstandard. It is dual-licensed under GPLv2 or Apache 2.0, at the user's option. Building requires GCC 11 or later or Clang 10 or later for C++20 support, and each stored value must be smaller than 4 GB.
For and against
For
- Stores arbitrary byte-array keys and values.
- Configurable read, write, and space tradeoffs.
- Supports multi-threaded compactions for terabyte-scale databases.
- Java wrapper and Maven artifacts are available.
Against
- Building requires GCC 11 or later or Clang 10 or later.
- Stored values must be smaller than 4 GB.
- Dual-licensed under GPLv2 or Apache 2.0.
The verdict
RocksDB offers an embeddable key-value engine with configurable storage tradeoffs and a Java wrapper. Review the build requirements, value-size limit, and license choice before adopting it.
Who it suits
RocksDB suits developers embedding persistent key-value storage in database engines, application caches, or other workloads. It is aimed at application servers managing up to a few terabytes on local or remote storage.
Plans and prices
RocksDB
Open-source C++ library · Dual-licensed under GPLv2 or Apache 2.0
Read 4 Oct 2026 · github.com
On the record
- Build requirement
- The project says it depends on GCC 11 or later or Clang 10 or later for C++20 support.github.com · read 3 Oct 2026
- Data model
- Keys and values can be arbitrarily sized byte streams.rocksdb.org · read 4 Oct 2026
- Engine
- RocksDB uses a log-structured merge database design with configurable tradeoffs among write, read, and space amplification.github.com · read 3 Oct 2026
- Integrations
- The project documents a MyRocks database storage engine as one example of using RocksDB.rocksdb.org · read 4 Oct 2026
- Java support
- RocksDB has a Java wrapper called RocksJava, and Java artifacts are published through Maven.github.com · read 4 Oct 2026
- Licensing
- RocksDB is dual-licensed under GPLv2 and Apache 2.0, and users may choose either license.github.com · read 4 Oct 2026
- Notable limit
- The basic operations documentation says value size must be smaller than 4 GB.github.com · read 4 Oct 2026
- Operations
- It provides database open and close, read and write, merge, and compaction filter operations.rocksdb.org · read 4 Oct 2026
- Performance
- It is optimized for low-latency storage such as flash and high-speed disk drives, and can use read/write rates offered by flash or RAM.rocksdb.org · read 4 Oct 2026
- Platform support
- The platform requirements page lists Linux, macOS, and Windows build requirements.github.com · read 4 Oct 2026
- Product
- RocksDB is an embeddable persistent key-value store for fast storage.rocksdb.org · read 3 Oct 2026
- Scale
- The project says multi-threaded compactions make RocksDB suitable for storing multiple terabytes in a single database.github.com · read 3 Oct 2026
- Scale and audience
- The project describes RocksDB as designed for application servers storing up to a few terabytes on local or remote storage systems.github.com · read 4 Oct 2026
- Security reporting
- The security policy asks users to report security issues through Meta's Bug Bounty program instead of public GitHub issues or pull requests.github.com · read 4 Oct 2026
- Storage design
- It uses a log-structured database engine written entirely in C++.rocksdb.org · read 4 Oct 2026
- Support
- The project directs users to its Google Group or Facebook Group for general questions and reserves GitHub issues for bug reports.github.com · read 4 Oct 2026
- Use cases
- The project describes use in database storage engines, application data caching, and embedded workloads.rocksdb.org · read 4 Oct 2026
- What it does
- RocksDB is an embeddable, persistent key-value store for fast storage.rocksdb.org · read 4 Oct 2026
The review
RocksDB is a C++ library that embeds persistent key-value storage inside an application. It is best suited to developers building storage engines or caches who can manage a native build and want control over storage tradeoffs. Its open-source license options and terabyte-scale design are appealing, but its developer-facing setup and value-size ceiling make it a poor fit for readers seeking a hosted, turnkey database.
Overview
RocksDB stores arbitrary byte-array keys and values, ordering keys with a comparator chosen by the application. Its log-structured merge design lets developers tune the balance among write speed, read performance, and space use. That flexibility is valuable when storage behavior is part of an application's design, but it also means the engine is not a plug-in substitute for a managed database with a ready-made query service.
The library supports opening and closing databases, reads and writes, merging, and compaction filters. It is optimized for low-latency storage such as flash drives and high-speed disks. Multi-threaded compactions support databases of multiple terabytes, making RocksDB relevant to application servers with substantial local or remote storage needs. Values must remain smaller than 4 GB, an important constraint for workloads that store large objects directly.
Key features
Configurable embedded storage
Because RocksDB is embedded, applications call its library rather than depend on a separate database service. The configurable log-structured design gives teams room to choose among write, read, and space amplification tradeoffs. That is a strong fit for database storage engines, application data caching, and other embedded workloads; it puts more responsibility on the developers integrating and operating it.
Builds and integrations
RocksDB is written in C++ and requires GCC 11 or later or Clang 10 or later for C++20 support. Optional compression libraries include zlib, bzip2, LZ4, Snappy, and Zstandard. RocksJava provides a Java wrapper, with Java artifacts published through Maven. These options broaden its use in C++ and Java projects, but the compiler requirement can rule it out for teams unable to control their build environment.
Encryption is supported, while data synchronization is not. For bugs and feature requests, the project points users to GitHub issues; questions and discussion go to its Facebook group. Security issues should instead be reported through Meta's Bug Bounty program, not public GitHub issues or pull requests.
Pricing
RocksDB is free and open source, with a listed plan of free. The plan is an open-source C++ library, not a hosted service, so its cost advantage comes with the work of integrating and maintaining it. There is no free trial because the software is free.
Users may choose either GPLv2 or Apache 2.0. That choice can affect whether RocksDB fits a project's licensing requirements, so teams should make it deliberately before adopting the library.
Platforms
Build requirements are provided for Linux, macOS, and Windows. The supported-platform list also includes iOS, FreeBSD, OpenBSD, AIX, and Solaris. RocksDB is an API-oriented library for self-hosted use, rather than a standalone database interface for end users.
Who it's for
RocksDB makes sense for developers building an embedded storage layer, a database engine, or an application cache who need low-latency key-value access and are prepared to tune storage tradeoffs. Its scale is suited to applications that need multiple terabytes in one database. It is less suitable for teams seeking built-in synchronization, a managed service, or a database that accepts values of 4 GB or more.
Pros and cons
- Pros: Free, open-source distribution with a choice of GPLv2 or Apache 2.0 gives teams licensing options without a software charge.
- Pros: Configurable read, write, and space tradeoffs help developers tailor an embedded engine to their workload.
- Pros: Multi-threaded compactions and support for multiple terabytes suit substantial application-side databases.
- Cons: C++20 compiler requirements and native build work make adoption less convenient for teams that cannot manage their build environment.
- Cons: Values must be smaller than 4 GB, excluding workloads that need larger individual values.
- Cons: Data synchronization is not supported, so it is not the right choice when that capability is required from the database.
Alternatives
For a managed cloud key-value service instead of an embedded library, consider Amazon DynamoDB. Its free tier is free and includes 25 WCUs, 25 RCUs, 25 GB of storage, and 25 replicated WCUs, billed per region and per-payer account; it also has a free trial.
Google Cloud Bigtable is another alternative. Its Enterprise plan is $0.65 a month for the Standard edition, and Enterprise Plus is $0.85 a month for the Premium edition; it also offers a free trial.
For a freemium Redis option, Upstash Redis has a free plan with 256 MB of data, 10 GB monthly bandwidth, and 500K monthly commands, billed at no cost. Its pay-as-you-go plan is listed at $0.20 a month.
Aerospike Database is a freemium alternative with a Community Edition offering 8 nodes, 2.5 TB of data, and 2 namespaces; its Enterprise Edition has custom pricing.
Riak KV is a free, Apache 2-licensed key-value option with a data module, built-in masterless replication, and HTTP API and Protocol Buffers interfaces.
Tencent Cloud API Gateway is another alternative.
VMware Workstation Pro is another alternative.
Apache Accumulo is a free, Apache License 2.0 sorted, distributed key-value store.
Browse more options in Key-Value Databases or Embedded Databases.
Verdict
Choose RocksDB if you are building an application or storage engine that needs a configurable, embedded key-value store and you can own its native build and operations. Its free licensing options, low-latency focus, and terabyte-scale design are persuasive; look elsewhere if you need synchronization, large individual values, or a managed database service.