SYSTEM Cited by 2 sources
RocksDB¶
RocksDB is an embeddable, high-performance, persistent key-value store originally built at Facebook/Meta, derived from Google's LevelDB. It's LSM-tree-based, written in C++, and widely used as an embedded storage engine in larger systems.
This wiki currently treats RocksDB as a stub — a named storage substrate referenced by other pages, not a deep-dive of its internals. Deepening is expected as more RocksDB-centric sources are ingested.
Project¶
- Site: rocksdb.org
- GitHub: facebook/rocksdb
- License: Apache 2.0 / GPLv2 dual-licensed
- Origin: fork of LevelDB (Google), 2012, by Facebook's database engineering team.
Role in Glean¶
Meta's Glean uses RocksDB as its fact-storage engine: "The data is ultimately stored using RocksDB, providing good scalability and efficient retrieval" (Source: sources/2025-01-01-meta-indexing-code-at-scale-with-glean). Glean stores arbitrary-schema facts keyed to predicate-field prefixes so that Angle queries specifying a prefix of fields can be served by prefix scans in RocksDB. RocksDB-level immutability also aligns with Glean's stacked immutable databases design for incremental indexing: Glean doesn't rewrite prior-revision fact data, it composes layers on top.
Architectural shape (brief)¶
- LSM-tree storage. Writes go to an in-memory memtable + WAL; once the memtable fills it's flushed as an SSTable (Sorted String Table) on disk. Background compaction merges SSTables.
- Column families. Independent keyspaces within one RocksDB instance, each with its own options (comparator, compression, compaction).
- Merge operators + custom comparators. Embedder-defined semantics for value combining and key ordering.
- Reads scan the memtable + SSTables in level order; bloom filters + block caches reduce I/O.
None of this is load-bearing to the Glean post, which treats RocksDB as a black-box persistent KV — but the design symmetry (immutable SSTables + layered composition) is why Glean's stacked-database mechanism is a natural fit underneath.
Seen in¶
- sources/2025-01-01-meta-indexing-code-at-scale-with-glean — RocksDB cited as Glean's persistent fact store.
- sources/2024-09-19-netflix-netflixs-key-value-data-abstraction-layer — RocksDB named as one of the pluggable backing engines for Netflix's KV Data Abstraction Layer alongside Cassandra, EVCache, and DynamoDB. "The abstraction works with multiple data stores like EVCache, DynamoDB, RocksDB, etc..." Shown only in the list (no concrete RocksDB-backed KV namespace example given in the post).
Related¶
- systems/glean — canonical wiki consumer of RocksDB referenced by the 2024-12-19 post.
- systems/netflix-kv-dal — Netflix's KV DAL names RocksDB as a pluggable backing engine option.
- concepts/stacked-immutable-databases — Glean's layering mechanism that builds on RocksDB-level immutability.
- concepts/lsm-tree · companies/meta · companies/netflix