Jump to content

RocksDB: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rodbauer (talk | contribs)
Rockset: Changed Rockset website link to new Rockset Inc Wikipedia page.
Tag: Reverted
Rodbauer (talk | contribs)
m Integration: updated links
Line 47: Line 47:


== Integration ==
== Integration ==
As an embeddable database, RocksDB can be used as a storage engine within a larger [[database]] management system (DBMS). For example, [[CockroachDB]] uses RocksDB as its storage engine,<ref>{{cite news |last=Edwards |first=Jessica |url=http://thenewstack.io/cockroachdb-unkillable-distributed-sql-database/ |title=Hello World: Meet CockroachDB, the Resilient SQL Database |work=The New Stack |date=2015-10-29 |access-date=2016-07-08}}</ref> mostly for transactional workloads while [https://rockset.com/blog/how-we-use-rocksdb-at-rockset/ Rockset] uses RocksDB mostly for analytical data processing. This shows that RocksDB can be used as a storage engine for both [[Online transaction processing]] and [[Online analytical processing]].
As an embeddable database, RocksDB can be used as a storage engine within a larger [[database]] management system (DBMS). For example, [[CockroachDB]] uses RocksDB as its storage engine,<ref>{{cite news |last=Edwards |first=Jessica |url=http://thenewstack.io/cockroachdb-unkillable-distributed-sql-database/ |title=Hello World: Meet CockroachDB, the Resilient SQL Database |work=The New Stack |date=2015-10-29 |access-date=2016-07-08}}</ref> mostly for transactional workloads while [[Rockset]] [https://rockset.com/blog/how-we-use-rocksdb-at-rockset/ uses RocksDB] mostly for analytical data processing. This shows that RocksDB can be used as a storage engine for both [[Online transaction processing]] and [[Online analytical processing]].


=== Alternative backend ===
=== Alternative backend ===

Revision as of 00:54, 11 April 2022

RocksDB
Original author(s)Dhruba Borthakur
Developer(s)Facebook, Inc.
Initial releaseMay 2012; 12 years ago (2012-05)
Stable release
9.7.3[1] Edit this on Wikidata / 16 October 2024
Repository
Written inC++
Operating systemWindows, macOS, Linux, FreeBSD, OpenBSD, Solaris, AIX
Platformx86, x86_64, ppc64, ppc64le, aarch64, s390x
TypeEmbedded database
LicenseApache 2.0 or GPL 2
Websiterocksdb.org

RocksDB is a high performance[2][3][4][5][6] embedded database for key-value data. It is a fork of Google's LevelDB optimized to exploit many CPU cores, 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; alongside many third-party language bindings. RocksDB is open-source software, and was originally released under a BSD 3-clause license.[7][8][9] However, in July 2017 the project was migrated to a dual license of both Apache 2.0 and GPLv2 license,[10] possibly in response to the Apache Software Foundation's blacklist of the previous BSD+Patents license clause.[11][12]

RocksDB is used in production systems at various web-scale enterprises[13] including Facebook, Yahoo!,[14] and LinkedIn.[15]

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:

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 does not provide a server or command-line interface.

History

RocksDB was created at Facebook by Dhruba Borthakur[26][27] in April 2012, as a fork of LevelDB with the initial stated goal of improving performance for server workloads.[28][29]

Integration

As an embeddable database, RocksDB can be used as a storage engine within a larger database management system (DBMS). For example, CockroachDB uses RocksDB as its storage engine,[30] mostly for transactional workloads while Rockset uses RocksDB mostly for analytical data processing. This shows that RocksDB can be used as a storage engine for both Online transaction processing and Online analytical processing.

Alternative backend

The following projects have been started to replace or offer an alternative storage engines for already-established database systems with RocksDB:

ArangoDB

ArangoDB has added RocksDB to its previous storage engine ("mmfiles").[31] Starting with ArangoDB 3.4, RocksDB will be the default storage engine in ArangoDB.[32]

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.[33]

MariaDB

MariaDB can use the MyRocks storage engine (which is forked from RocksDB) since MariaDB 10.2.5 (Alpha status) [34] and stable since MariaDB 10.2.16 in 2018.[35]

MongoDB

The MongoRocks project provides a storage module for MongoDB where the storage engine is RocksDB.[36][37][38]

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.[39]

MySQL

The MyRocks project creates a new RocksDB based storage engine for MySQL.[40][41] In-depth details about MyRocks were presented at Percona Live 2016.[42]

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 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]

Rockset

The Rockset service that is used for operational data analytics uses RocksDB as its storage engine.[48]

SSDB

The ssdb-rocks[49] project uses RocksDB as the storage engine for the SSDB[50] NoSQL Database.

TiDB

The TiDB[51] project uses RocksDB as its storage engine.[52]

YugabyteDB

The YugabyteDB[53] 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:

References

  1. ^ . 16 October 2024 https://github.com/facebook/rocksdb/releases/tag/v9.7.3. Retrieved 16 October 2024. {{cite web}}: Missing or empty |title= (help)
  2. ^ "Performance Benchmarks". GitHub. Retrieved November 29, 2015.
  3. ^ "Benchmarking the leveldb family". 7 July 2014. Retrieved March 10, 2016.
  4. ^ "Comparing LevelDB and RocksDB, take 2". 27 April 2015. Retrieved March 10, 2016.
  5. ^ "Benchmarking LevelDB vs. RocksDB vs. HyperLevelDB vs. LMDB Performance for InfluxDB". 20 June 2014. Retrieved March 10, 2016.
  6. ^ Golan-Gueta, Guy; Bortnikov, Edward; Hillel, Eschar; Keidar, Idit (April 21, 2015). "Scaling Concurrent Log-Structured Data Stores". EuroSys '15 Proceedings of the Tenth European Conference on Computer Systems: 1–14. doi:10.1145/2741948.2741973. ISBN 9781450332385. S2CID 5849146.
  7. ^ "Facebook's latest open source effort: a flash-powered database called RocksDB". 21 November 2013. Retrieved March 10, 2016.
  8. ^ "Under the Hood: Building and open-sourcing RocksDB". Facebook. Retrieved March 10, 2016.
  9. ^ "RocksDB - Facebook's Database Now Open Source". Retrieved March 10, 2016.
  10. ^ "GitHub pull request". GitHub. Retrieved July 20, 2017.
  11. ^ "Apache says 'no' to Facebook code libraries". The Register. Retrieved July 20, 2017.
  12. ^ "GitHub issue". GitHub. Retrieved July 20, 2017.
  13. ^ "Users.md". GitHub. Retrieved December 1, 2015.
  14. ^ "RocksDB on Steroids". Retrieved March 10, 2016.
  15. ^ "Benchmarking Apache Samza: 1.2 million messages per second on a single node". Retrieved March 10, 2016.
  16. ^ "RocksDB transactions". GitHub. Retrieved 2016-04-04.
  17. ^ "How to backup RocksDB?". GitHub. Retrieved 2017-07-19.
  18. ^ "Checkpoints". GitHub. Retrieved 2017-07-19.
  19. ^ "Column families in RocksDB". GitHub. Retrieved 2016-04-04.
  20. ^ "RocksDB bloom filters". GitHub. Retrieved 2016-04-04.
  21. ^ "RocksDB TTL support". GitHub. Retrieved 2016-04-04.
  22. ^ "Universal compaction". GitHub. Retrieved 2016-04-04.
  23. ^ "RocksDB merge operator". GitHub. Retrieved 2016-04-04.
  24. ^ "RocksDB perf context and IO stats context". GitHub. Retrieved 2016-04-04.
  25. ^ "Spatial indexing in RocksDB". rocksdb.org. Retrieved 2018-07-19.
  26. ^ "First commit where RocksDB diverges from LevelDB". GitHub. May 10, 2012. Retrieved March 15, 2016.
  27. ^ "rocksdb README file". GitHub. Nov 30, 2012. Retrieved March 15, 2016.
  28. ^ "The History of RocksDB". November 24, 2013. Retrieved March 10, 2016.
  29. ^ Borthakur, Dhruba (November 22, 2013). "RocksDB: A High Performance Embedded Key-Value Store for Flash Storage - Data@Scale". YouTube. Retrieved March 10, 2016. ... The story of why we decided to do RocksDB ...
  30. ^ Edwards, Jessica (2015-10-29). "Hello World: Meet CockroachDB, the Resilient SQL Database". The New Stack. Retrieved 2016-07-08.
  31. ^ "Comparing new RocksDB and MMFiles storage engines".
  32. ^ "RC1 ArangoDB 3.4 - Whats new?". 6 September 2018.
  33. ^ "Open-sourcing a 10x reduction in Apache Cassandra tail latency". 5 March 2018.
  34. ^ "MyRocks". MariaDB KnowledgeBase. Retrieved 2019-04-28.
  35. ^ "MariaDB 10.2.16 Release Notes".
  36. ^ "mongodb-partners/mongo-rocks". GitHub. 29 October 2021.
  37. ^ "Integrating RocksDB with MongoDB". Retrieved July 19, 2018.
  38. ^ "MongoDB + RocksDB at Parse". Retrieved December 1, 2015.
  39. ^ "facebookgo/rocks-strata". GitHub. 31 October 2021.
  40. ^ "facebook/mysql-5.6". GitHub. 2 November 2021.
  41. ^ "MyRocks: MySQL on RocksDB" (PDF). Retrieved November 29, 2015.
  42. ^ "MyRocks Deep Dive". 19 April 2016. Retrieved May 9, 2016.
  43. ^ "Storage Devices -- Ceph Documentation".
  44. ^ "Apache Flink 1.8 Documentation: State Backends". ci.apache.org. Retrieved 2019-08-11.
  45. ^ "FusionDB". Evolved Binary.
  46. ^ "The Design and Implementation of FusionDB" (PDF). XML Prague.
  47. ^ "LogDevice: a distributed data store for logs". Mark Marchukov, Facebook. 31 August 2017.
  48. ^ "How we use RocksDB at Rockset". rockset.com. Retrieved 2019-07-10.
  49. ^ "ideawu/ssdb-rocks". GitHub. 21 August 2021.
  50. ^ https://ssdb.io
  51. ^ "pingcap/tidb". GitHub. 4 November 2021.
  52. ^ "TiDB Internal (I) - Data Storage". Shen Li.
  53. ^ "How We Built a High Performance Document Store on RocksDB?". 20 February 2019.
  54. ^ "warrenfalk/rocksdb-sharp". GitHub. 28 September 2021.
  55. ^ "chicken-rocksdb".
  56. ^ "b1naryth1ef/rocksdb". GitHub. 22 October 2019.
  57. ^ "urbint/rox". GitHub. September 2021.
  58. ^ "leo-project/erocksdb". GitHub. September 2021.
  59. ^ "barrel-db/erlang-rocksdb".
  60. ^ "tecbot/gorocksdb". GitHub. 29 October 2021.
  61. ^ "rocksdb-haskell: Haskell bindings to RocksDB".
  62. ^ "RocksJava". GitHub.
  63. ^ "rocksdb".
  64. ^ "iabudiab/ObjectiveRocks". GitHub. 2 August 2021.
  65. ^ "OCaml bindings for RocksDB". GitHub. 8 October 2021.
  66. ^ "An OCaml RocksDb binding using ocaml-ctypes". GitHub. 28 September 2020.
  67. ^ "RocksDB - Perl extension for RocksDB - metacpan.org".
  68. ^ "Photonios/rocksdb-php". GitHub. 11 August 2021.
  69. ^ "SWI-Prolog interface for RocksDB".
  70. ^ "stephan-hof/pyrocksdb". GitHub. 27 October 2021.
  71. ^ "rocksdb-ruby - RubyGems.org - your community gem host".
  72. ^ "spacejam/rust-rocksdb". GitHub. 2 November 2021.