Embedded key-value database
RocksDB is a high performance[ 2] [ 3] [ 4] [ 5] [ 6] embedded database forkey-value data. It is afork of Google'sLevelDB optimized to exploitmulti-core processors (CPUs), and make efficient use of fast storage, such assolid-state drives (SSD), forinput/output (I/O)bound workloads. It is based on alog-structured merge-tree (LSM tree) data structure. It is written inC++ and provides officiallanguage bindings forC++ ,C , andJava . Manythird-party language bindings exist. RocksDB isfree and open-source software , released originally under aBSD 3-clause license.[ 7] [ 8] [ 9] However, in July 2017 the project was migrated to a dual license of bothApache 2.0 andGPLv2 license.[ 10] This change helped its adoption in Apache Software Foundation's projects after blacklist of the previous BSD+Patents license clause.[ 11] [ 12]
RocksDB is used in production systems at variousweb-scale enterprises[ 13] includingFacebook ,Yahoo! ,[ 14] andLinkedIn .[ 15]
RocksDB, likeLevelDB , stores keys and values in arbitrary byte arrays, and data is sorted byte-wise by key or by providing a custom comparator.
RocksDB provides all of the features of LevelDB, plus:
and others.[ 26]
RocksDB is not anSQL database (althoughMyRocks combines RocksDB withMySQL ). Like otherNoSQL anddbm stores, it has norelational data model , and it does not support SQL queries. Also, it has no direct support for secondary indexes, however a user may build their own internally using Column Families or externally. Applications use RocksDB as alibrary , as it provides no server orcommand-line interface .
RocksDB was created atFacebook by Dhruba Borthakur[ 27] [ 28] in April 2012, as a fork ofLevelDB with the initial stated goal of improving performance for server workloads.[ 29] [ 30]
As an embeddable database, RocksDB can be used as a storage engine within a largerdatabase management system (DBMS). For example,Rockset uses RocksDB[ 31] mostly for analytical data processing.
Alternative backend [ edit ] The following projects have been started to replace or offer alternative storage engines for already-established database systems with RocksDB:
ArangoDB has added RocksDB to its previous storage engine ("mmfiles").[ 32] RocksDB is be the default storage engine since ArangoDB 3.4.[ 33]
Cassandra on RocksDB can improve the performance of Apache Cassandra significantly (3–4 times faster in general, 100 times faster in some use-cases).[citation needed ] The Instagram team at Facebook developed and open-sourced their code, along with benchmarks of their performance results.[ 34]
MariaDB can use the MyRocks storage engine (which is forked from RocksDB) since MariaDB 10.2.5 (Alpha status)[ 35] and stable since MariaDB 10.2.16 in 2018.[ 36]
The MongoRocks project provides a storage module forMongoDB where the storage engine is RocksDB.[ 37] [ 38] [ 39]
A related program is Rocks Strata, a tool written inGo , which allows managing incremental backups of MongoDB when RocksDB is used as the storage engine.[ 40]
The MyRocks project created a new RocksDB-based storage engine forMySQL .[ 41] [ 42] In-depth details about MyRocks were presented at Percona Live 2016.[ 43]
Oxigraph [ 44] is agraph database implementing theSPARQL standard, based on RocksDB
The UKV[ 45] project allows users to use RocksDB on par withLevelDB as the underlyingkey-value store . It represents a shared abstraction forcreate, read, update and delete (CRUD) operations common to every storage engine. It augments it with structured bindings for several high-level languages, includingPython ,Java , andGo .
The following database systems and applications have chosen to use RocksDB as their embedded storage engine:
TheCeph's BlueStore storage layer uses RocksDB for metadata management in OSD devices.[ 46]
Apache Flink uses RocksDB to store checkpoints.[ 47]
FusionDB[ 48] uses RocksDB as its storage engine for XML, Key/Value, and JSON.[ 49]
LogDevice's LogsDB is built atop RocksDB.[ 50]
Kafka Streams uses RocksDB for its state stores.[ 51]
The Manhattan Distributed Key-Value Store has used RocksDB as its primary engine to store Twitter data since 2018.[ 52]
TheRockset [ 53] service that is used for operational data analytics uses RocksDB as its storage engine.[ 54]
The ssdb-rocks[ 55] project uses RocksDB as the storage engine for the SSDB[ 56] NoSQL Database.
The TiDB[ 57] project uses RocksDB as its storage engine.[ 58]
TheYugabyteDB database uses a modified version of RocksDB as part of its DocDB storage engine.[ 59]
Third-party language bindings [ edit ] Third-party programming language bindings available for RocksDB include:
^ . 24 April 2025https://github.com/facebook/rocksdb/releases/tag/v10.2.1 . Retrieved24 April 2025 . {{cite web }}:Missing or empty|title= (help ) ^ "Performance Benchmarks" .GitHub . RetrievedNovember 29, 2015 .^ "Benchmarking the leveldb family" . 7 July 2014. RetrievedMarch 10, 2016 .^ "Comparing LevelDB and RocksDB, take 2" . 27 April 2015. RetrievedMarch 10, 2016 .^ "Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB" . 20 June 2014. RetrievedMarch 10, 2016 .^ Golan-Gueta, Guy; Bortnikov, Edward; Hillel, Eschar;Keidar, Idit (April 21, 2015). "Scaling concurrent log-structured data stores".Proceedings of the Tenth European Conference on Computer Systems . pp. 1– 14.doi :10.1145/2741948.2741973 .ISBN 9781450332385 .S2CID 5849146 . ^ "Facebook's latest open source effort: a flash-powered database called RocksDB" . 21 November 2013. Archived fromthe original on 24 February 2020. RetrievedMarch 10, 2016 .^ "Under the Hood: Building and open-sourcing RocksDB" .Facebook . RetrievedMarch 10, 2016 .^ "RocksDB - Facebook's Database Now Open Source" . RetrievedMarch 10, 2016 .^ "GitHub pull request" .GitHub . RetrievedJuly 20, 2017 .^ "Apache says 'no' to Facebook code libraries" .The Register . RetrievedJuly 20, 2017 .^ "GitHub issue" .GitHub . RetrievedJuly 20, 2017 .^ "Users.md" .GitHub . RetrievedDecember 1, 2015 .^ "RocksDB on Steroids" . RetrievedMarch 10, 2016 .^ "Benchmarking Apache Samza: 1.2 million messages per second on a single node" . RetrievedMarch 10, 2016 .^ "RocksDB transactions" .GitHub . Retrieved2016-04-04 .^ "How to backup RocksDB?" .GitHub . Retrieved2017-07-19 .^ "Checkpoints" .GitHub . Retrieved2017-07-19 .^ "Column families in RocksDB" .GitHub . Retrieved2016-04-04 .^ "RocksDB bloom filters" .GitHub . Retrieved2016-04-04 .^ "RocksDB TTL support" .GitHub . Retrieved2016-04-04 .^ "Universal compaction" .GitHub . Retrieved2016-04-04 .^ "RocksDB merge operator" .GitHub . Retrieved2016-04-04 .^ "RocksDB perf context and IO stats context" .GitHub . Retrieved2016-04-04 .^ "Spatial indexing in RocksDB" .rocksdb.org . Retrieved2018-07-19 .^ "Features Not in LevelDB" .GitHub .^ "First commit where RocksDB diverges from LevelDB" .GitHub . May 10, 2012. RetrievedMarch 15, 2016 .^ "Rocksdb readme file" .GitHub . Nov 30, 2012. RetrievedMarch 15, 2016 .^ "The History of RocksDB" . November 24, 2013. RetrievedMarch 10, 2016 .^ Borthakur, Dhruba (November 22, 2013)."RocksDB: A High Performance Embedded Key-Value Store for Flash Storage - Data@Scale" .YouTube . RetrievedMarch 10, 2016 .... The story of why we decided to do RocksDB ... ^ Dhoot, Sandeep (2019-06-27)."How We Use RocksDB at Rockset" .rockset.com . Retrieved2023-03-01 . ^ "Comparing new RocksDB and MMFiles storage engines" .ArangoDB .^ "RC1 ArangoDB 3.4 - Whats new?" . 6 September 2018.^ "Open-sourcing a 10x reduction in Apache Cassandra tail latency" . 5 March 2018.^ "MyRocks" .MariaDB KnowledgeBase . Retrieved2019-04-28 .^ "MariaDB 10.2.16 Release Notes" .MariaDB KnowledgeBase .^ "mongodb-partners/mongo-rocks" .GitHub . 29 October 2021.^ "Integrating RocksDB with MongoDB" . RetrievedJuly 19, 2018 .^ "MongoDB + RocksDB at Parse" . RetrievedDecember 1, 2015 .^ "facebookgo/rocks-strata" .GitHub . 31 October 2021.^ "facebook/mysql-5.6" .GitHub . 2 November 2021.^ "MyRocks: MySQL on RocksDB" (PDF) . RetrievedNovember 29, 2015 .^ "MyRocks Deep Dive" . 19 April 2016. RetrievedMay 9, 2016 .^ Pellissier Tanon, Thomas (July 12, 2024)."Oxigraph" – via GitHub. ^a b c d e "unum-cloud/ukv" .GitHub . 28 December 2022.^ "Storage Devices -- Ceph Documentation" . Archived fromthe original on 2020-02-24. Retrieved2017-11-08 .^ "Apache Flink 1.8 Documentation: State Backends" .ci.apache.org . Retrieved2019-08-11 .^ "FusionDB" . Evolved Binary.^ "The Design and Implementation of FusionDB" (PDF) . XML Prague.^ "LogDevice: a distributed data store for logs" . Mark Marchukov, Facebook. 31 August 2017.^ "Configuring a streams application" .kafka.apache.org . Retrieved2024-03-11 .^ "Adopting RocksDB within Manhattan" .Twitter . 28 December 2022.^ "Rockset: Search and analytics database" .rockset.com .^ "How we use RocksDB at Rockset" .rockset.com . Retrieved2019-07-10 .^ "ideawu/ssdb-rocks" .GitHub . 21 August 2021.^ "Home" .ID-2Sbo .^ "pingcap/tidb" .GitHub . 4 November 2021.^ "TiDB Internal (I) - Data Storage" . Shen Li. 11 July 2017.^ "How We Built a High Performance Document Store on RocksDB?" . 20 February 2019.^ "warrenfalk/rocksdb-sharp" .GitHub . 28 September 2021.^ "RocksDB bindings for CHICKEN Scheme 5" .wiki.call-cc.org . Retrieved2024-07-13 .^ "b1naryth1ef/rocksdb" .GitHub . 22 October 2019.^ "urbint/rox" .GitHub . September 2021.^ "leo-project/erocksdb" .GitHub . September 2021.^ "barrel-db / erlang-rocksdb · GitLab" .GitLab .^ "tecbot/gorocksdb" .GitHub . 29 October 2021.^ "rocksdb-haskell" .Hackage .^ "RocksJava" .GitHub .^ "RocksDB-Android" .GitHub .^ "RocksDB Kotlin Multiplatform" .GitHub .^ "rocksdb" . 25 March 2022.^ "rocksdb" .GitHub .^ "iabudiab/ObjectiveRocks" .GitHub . 2 August 2021.^ "OCaml bindings for RocksDB" .GitHub . 8 October 2021.^ "An OCaml RocksDb binding using ocaml-ctypes" .GitHub . 28 September 2020.^ "RocksDB" .MetaCPAN .^ "Photonios/rocksdb-php" .GitHub . 11 August 2021.^ " "rocksdb" pack for SWI-Prolog" .www.swi-prolog.org .^ "stephan-hof/pyrocksdb" .GitHub . 27 October 2021.^ "rocksdb-ruby | RubyGems.org | your community gem host" .rubygems.org .^ "rust-rocksdb/rust-rocksdb" .GitHub . 11 July 2024.
Products and services
People
Founders Board
Executive officers
Oversight Board
Members Board of Trustees Former members
Notable employees
Open source Mass media Concepts Business Lists Related