YugabyteDB’s implementation of DocDB, based on RocksDB, has made significant improvements to ensure node density and scalability, allowing hundreds of tablets per tserver without limiting the amount of data per node.
This blog covers the function and implementation compactions, focusing on those details and configurations that are relevant to YugabyteDB. The second half focuses on the behavior and prioritization of background compactions.
As described in our previous post “How We Built a High Performance Document Store on RocksDB?”, YugabyteDB’s distributed document store (DocDB) uses RocksDB as its per-node storage engine. We made multiple performance and data density related enhancements to RocksDB in the course of embedding it into DocDB’s document storage layer (figure below). These enhancements are distributed as part of the YugabyteDB open source project. The goal of this post is to deep dive into these enhancements for the benefit of engineering teams interested in leveraging RocksDB beyond its original design intent of a fast monolithic key-value store.
RocksDB is a popular embeddable persistent key-value store. First open sourced by Facebook in 2012 as a fork of the Google LevelDB project, it has been adapted over the years to a wide range of workloads including database storage engines and application data caching.
In this post, we explain our rationale for selecting RocksDB as a foundational building block for YugabyteDB.