Software:RocksDB
![]() | |
Original author(s) | Dhruba Borthakur |
---|---|
Developer(s) | Meta Platforms (was Facebook, Inc.) |
Initial release | May 2012 |
Written in | C++ |
Operating system | Windows, macOS, Linux, FreeBSD, OpenBSD, Solaris, AIX |
Platform | Cross-platform |
Type | Embedded database |
License | Apache 2.0 or GPL 2 |
Website | rocksdb |
RocksDB is a high performance[1][2][3][4][5] embedded database for key-value data. It is a fork of Google's LevelDB optimized to exploit multi-core processors (CPUs), and make efficient use of fast storage, such as solid-state drives (SSD), for input/output (I/O) bound workloads. It is based on a log-structured merge-tree (LSM tree) data structure. It is written in C++ and provides official language bindings for C++, C, and Java. Many third-party language bindings exist. RocksDB is free and open-source software, released originally under a BSD 3-clause license.[6][7][8] However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license.[9] This change helped its adoption in Apache Software Foundation's projects after blacklist of the previous BSD+Patents license clause.[10][11]
RocksDB is used in production systems at various web-scale enterprises[12] including Facebook, Yahoo!,[13] and LinkedIn.[14]
Features
RocksDB, like LevelDB, 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:
- Transactions[15]
- Backups[16] and snapshots[17]
- Column families[18]
- Bloom filters[19]
- Time to live (TTL) support[20]
- Universal compaction[21]
- Merge operators[22]
- Statistics collection[23]
- Geospatial indexing[24]
and others: List of RocksDB features that are not in LevelDB.
RocksDB is not an SQL database (although MyRocks combines RocksDB with MySQL). Like other NoSQL and dbm stores, it has no relational 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 a library, as it provides no server or command-line interface.
History
RocksDB was created at Facebook by Dhruba Borthakur[25][26] in April 2012, as a fork of LevelDB with the initial stated goal of improving performance for server workloads.[27][28]
Integration
As an embeddable database, RocksDB can be used as a storage engine within a larger database management system (DBMS). For example, Rockset uses RocksDB[29] mostly for analytical data processing.
Alternative backend
The following projects have been started to replace or offer alternative storage engines for already-established database systems with RocksDB:
ArangoDB
ArangoDB has added RocksDB to its previous storage engine ("mmfiles").[30] Starting with ArangoDB 3.4, RocksDB will be the default storage engine in ArangoDB.[31]
Cassandra
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.[32]
MariaDB
MariaDB can use the MyRocks storage engine (which is forked from RocksDB) since MariaDB 10.2.5 (Alpha status) [33] and stable since MariaDB 10.2.16 in 2018.[34]
MongoDB
The MongoRocks project provides a storage module for MongoDB where the storage engine is RocksDB.[35][36][37]
A related program is Rocks Strata, a tool written in Go, which allows managing incremental backups of MongoDB when RocksDB is used as the storage engine.[38]
MySQL
The MyRocks project created a new RocksDB-based storage engine for MySQL.[39][40] In-depth details about MyRocks were presented at Percona Live 2016.[41]
Oxigraph
Oxigraph is a graph database implementing the SPARQL standard, based on RocksDB
UKV
The UKV[42] project allows users to use RocksDB on par with LevelDB as the underlying key-value store. It represents a shared abstraction for create, read, update and delete (CRUD) operations common to every storage engine. It augments it with structured bindings for several high-level languages, including Python, Java, and Go.
Embedded
The following database systems and applications have chosen to use RocksDB as their embedded storage engine:
Ceph's BlueStore
The Ceph's BlueStore storage layer uses RocksDB for metadata management in OSD devices.[43]
Apache Flink
Apache Flink uses RocksDB to store checkpoints.[44]
FusionDB
FusionDB[45] uses RocksDB as its storage engine for XML, Key/Value, and JSON.[46]
LogDevice LogsDB
LogDevice's LogsDB is built atop RocksDB.[47]
Manhattan
The Manhattan Distributed Key-Value Store has used RocksDB as its primary engine to store Twitter data since 2018.[48]
Rockset
The Rockset service that is used for operational data analytics uses RocksDB as its storage engine.[49]
SSDB
The ssdb-rocks[50] project uses RocksDB as the storage engine for the SSDB[51] NoSQL Database.
TiDB
The TiDB[52] project uses RocksDB as its storage engine.[53]
YugabyteDB
The YugabyteDB[54] database uses a modified version of RocksDB as part of its DocDB storage engine
Third-party language bindings
Third-party programming language bindings available for RocksDB include:
- C[42]
- C#[55]
- Chicken Scheme[56]
- D[57]
- Elixir[58]
- Erlang[59][60]
- Go[42][61]
- Haskell[62]
- Java[42][63]
- Node.js[64]
- Nim[65]
- Objective-C, and Swift[66]
- OCaml[67][68]
- Perl[69]
- PHP[70]
- Prolog[71]
- Python[42][72]
- Ruby[73]
- Rust[74]
References
- ↑ "Performance Benchmarks". https://github.com/facebook/rocksdb/wiki/Performance-Benchmarks.
- ↑ "Benchmarking the leveldb family". 7 July 2014. http://smalldatum.blogspot.com/2014/07/benchmarking-leveldb-family.html.
- ↑ "Comparing LevelDB and RocksDB, take 2". 27 April 2015. http://smalldatum.blogspot.com/2015/04/comparing-leveldb-and-rocksdb-take-2.html.
- ↑ "Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB". 20 June 2014. https://influxdata.com/blog/benchmarking-leveldb-vs-rocksdb-vs-hyperleveldb-vs-lmdb-performance-for-influxdb/.
- ↑ 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.
- ↑ "Facebook's latest open source effort: a flash-powered database called RocksDB". 21 November 2013. https://gigaom.com/2013/11/21/facebooks-latest-open-source-effort-a-flash-powered-database-called-rocksdb/.
- ↑ "Under the Hood: Building and open-sourcing RocksDB". https://www.facebook.com/notes/facebook-engineering/under-the-hood-building-and-open-sourcing-rocksdb/10151822347683920/.
- ↑ "RocksDB - Facebook's Database Now Open Source". http://www.i-programmer.info/news/84-database/6624-rocksdb-facebooks-database-now-open-source.html.
- ↑ "GitHub pull request". https://github.com/facebook/rocksdb/tree/3c327ac2d0fd50bbd82fe1f1af5de909dad769e6/env.
- ↑ "Apache says 'no' to Facebook code libraries". https://www.theregister.co.uk/2017/07/17/apache_says_no_to_facebook_code_libraries/.
- ↑ "GitHub issue". https://github.com/facebook/rocksdb/issues/2605.
- ↑ "Users.md". https://github.com/facebook/rocksdb/blob/master/USERS.md.
- ↑ "RocksDB on Steroids". http://www.i-programmer.info/news/84-database/8542-rocksdb-on-steroids.html.
- ↑ "Benchmarking Apache Samza: 1.2 million messages per second on a single node". https://engineering.linkedin.com/performance/benchmarking-apache-samza-12-million-messages-second-single-node.
- ↑ "RocksDB transactions". https://github.com/facebook/rocksdb/wiki/Transactions.
- ↑ "How to backup RocksDB?". https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB.
- ↑ "Checkpoints". https://github.com/facebook/rocksdb/wiki/Checkpoints.
- ↑ "Column families in RocksDB". https://github.com/facebook/rocksdb/wiki/Column-Families.
- ↑ "RocksDB bloom filters". https://github.com/facebook/rocksdb/wiki/RocksDB-Bloom-Filter.
- ↑ "RocksDB TTL support". https://github.com/facebook/rocksdb/wiki/Time-to-Live.
- ↑ "Universal compaction". https://github.com/facebook/rocksdb/wiki/Universal-Compaction.
- ↑ "RocksDB merge operator". https://github.com/facebook/rocksdb/wiki/Merge-Operator-Implementation.
- ↑ "RocksDB perf context and IO stats context". https://github.com/facebook/rocksdb/wiki/Perf-Context-and-IO-Stats-Context.
- ↑ "Spatial indexing in RocksDB". https://rocksdb.org/blog/2015/07/17/spatial-indexing-in-rocksdb.html.
- ↑ "First commit where RocksDB diverges from LevelDB". May 10, 2012. https://github.com/facebook/rocksdb/commit/cc6c32535aec596036c56fe742a39182539f76fa.
- ↑ "Rocksdb readme file". Nov 30, 2012. https://github.com/facebook/rocksdb/commit/6eb5ed9a4922ec2d121768adfa3ab3b6ead5d627.
- ↑ "The History of RocksDB". November 24, 2013. http://rocksdb.blogspot.com/2013/11/the-history-of-rocksdb.html.
- ↑ Borthakur, Dhruba (November 22, 2013). "RocksDB: A High Performance Embedded Key-Value Store for Flash Storage - Data@Scale". https://www.youtube.com/watch?v=V_C-T5S-w8g. "... The story of why we decided to do RocksDB ..."
- ↑ Dhoot, Sandeep (2019-06-27). "How We Use RocksDB at Rockset". https://rockset.com/blog/how-we-use-rocksdb-at-rockset/. Retrieved 2023-03-01.
- ↑ "Comparing new RocksDB and MMFiles storage engines". https://www.arangodb.com/community-server/rocksdb-storage-engine/.
- ↑ "RC1 ArangoDB 3.4 - Whats new?". 6 September 2018. https://www.arangodb.com/2018/09/rc1-arangodb-3-4-whats-new/.
- ↑ "Open-sourcing a 10x reduction in Apache Cassandra tail latency". 5 March 2018. https://instagram-engineering.com/open-sourcing-a-10x-reduction-in-apache-cassandra-tail-latency-d64f86b43589.
- ↑ "MyRocks". https://mariadb.com/kb/en/library/myrocks/.
- ↑ "MariaDB 10.2.16 Release Notes". https://mariadb.com/kb/en/mariadb-10216-release-notes/.
- ↑ "mongodb-partners/mongo-rocks". 29 October 2021. https://github.com/mongodb-partners/mongo-rocks.
- ↑ "Integrating RocksDB with MongoDB". https://rocksdb.org/blog/2015/04/22/integrating-rocksdb-with-mongodb-2.html.
- ↑ "MongoDB + RocksDB at Parse". http://blog.parse.com/announcements/mongodb-rocksdb-parse/.
- ↑ "facebookgo/rocks-strata". 31 October 2021. https://github.com/facebookgo/rocks-strata.
- ↑ "facebook/mysql-5.6". 2 November 2021. https://github.com/facebook/mysql-5.6.
- ↑ "MyRocks: MySQL on RocksDB". https://www.percona.com/live/europe-amsterdam-2015/sites/default/files/slides/MyRocksAtFacebook_201509.pdf.
- ↑ "MyRocks Deep Dive". 19 April 2016. http://www.slideshare.net/matsunobu/myrocks-deep-dive/.
- ↑ 42.0 42.1 42.2 42.3 42.4 "unum-cloud/ukv". 28 December 2022. https://github.com/unum-cloud/ukv.
- ↑ "Storage Devices -- Ceph Documentation". http://docs.ceph.com/docs/luminous/rados/configuration/storage-devices/.
- ↑ "Apache Flink 1.8 Documentation: State Backends". https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/state_backends.html#the-rocksdbstatebackend.
- ↑ "FusionDB". Evolved Binary. https://fusiondb.com.
- ↑ "The Design and Implementation of FusionDB". XML Prague. https://archive.xmlprague.cz/2019/files/xmlprague-2019-proceedings.pdf#page179.
- ↑ "LogDevice: a distributed data store for logs". Mark Marchukov, Facebook. 31 August 2017. https://code.facebook.com/posts/357056558062811/logdevice-a-distributed-data-store-for-logs/.
- ↑ "Adopting RocksDB within Manhattan". 28 December 2022. https://blog.twitter.com/engineering/en_us/topics/infrastructure/2021/adopting-rocksdb-within-manhattan.
- ↑ "How we use RocksDB at Rockset" (in en). https://rockset.com/blog/how-we-use-rocksdb-at-rockset/.
- ↑ "ideawu/ssdb-rocks". 21 August 2021. https://github.com/ideawu/ssdb-rocks.
- ↑ https://ssdb.io
- ↑ "pingcap/tidb". 4 November 2021. https://github.com/pingcap/tidb.
- ↑ "TiDB Internal (I) - Data Storage". Shen Li. 11 July 2017. https://pingcap.com/blog/2017-07-11-tidbinternal1.
- ↑ "How We Built a High Performance Document Store on RocksDB?". 20 February 2019. https://blog.yugabyte.com/how-we-built-a-high-performance-document-store-on-rocksdb/.
- ↑ "warrenfalk/rocksdb-sharp". 28 September 2021. https://github.com/warrenfalk/rocksdb-sharp.
- ↑ "chicken-rocksdb". http://wiki.call-cc.org/eggref/5/rocksdb.
- ↑ "b1naryth1ef/rocksdb". 22 October 2019. https://github.com/b1naryth1ef/rocksdb.
- ↑ "urbint/rox". September 2021. https://github.com/urbint/rox.
- ↑ "leo-project/erocksdb". September 2021. https://github.com/leo-project/erocksdb.
- ↑ "barrel-db/erlang-rocksdb". https://gitlab.com/barrel-db/erlang-rocksdb.
- ↑ "tecbot/gorocksdb". 29 October 2021. https://github.com/tecbot/gorocksdb.
- ↑ "rocksdb-haskell: Haskell bindings to RocksDB". https://hackage.haskell.org/package/rocksdb-haskell.
- ↑ "RocksJava". https://github.com/facebook/rocksdb/wiki/RocksJava-Basics.
- ↑ "rocksdb". 25 March 2022. https://npmjs.org/package/rocksdb.
- ↑ "rocksdb". https://github.com/status-im/nim-rocksdb.
- ↑ "iabudiab/ObjectiveRocks". 2 August 2021. https://github.com/iabudiab/ObjectiveRocks.
- ↑ "OCaml bindings for RocksDB". 8 October 2021. https://github.com/ahrefs/ocaml-ahrocksdb.
- ↑ "An OCaml RocksDb binding using ocaml-ctypes". 28 September 2020. https://github.com/domsj/orocksdb.
- ↑ "RocksDB - Perl extension for RocksDB - metacpan.org". https://metacpan.org/pod/RocksDB.
- ↑ "Photonios/rocksdb-php". 11 August 2021. https://github.com/Photonios/rocksdb-php.
- ↑ "SWI-Prolog interface for RocksDB". http://www.swi-prolog.org/pack/list?p=rocksdb.
- ↑ "stephan-hof/pyrocksdb". 27 October 2021. https://github.com/stephan-hof/pyrocksdb.
- ↑ "rocksdb-ruby - RubyGems.org - your community gem host". http://rubygems.org/gems/rocksdb-ruby.
- ↑ "spacejam/rust-rocksdb". 2 November 2021. https://github.com/spacejam/rust-rocksdb.
External links
![]() | Original source: https://en.wikipedia.org/wiki/RocksDB.
Read more |