Welcome to RocksDB
RocksDB is a high-performance embedded database library that provides a persistent key-value store for fast storage. Developed and maintained by the Facebook Database Engineering Team, RocksDB is built on LevelDB and optimized for modern storage hardware, especially flash drives.Quick Start
Get up and running with RocksDB in minutes
Installation
Install RocksDB on your platform
API Reference
Explore the complete API documentation
Developer Guide
Learn from real-world code examples
Why RocksDB?
RocksDB is designed to efficiently use modern hardware while providing exceptional performance for a wide range of workloads.Key Features
Log-Structured Merge (LSM) Design
Log-Structured Merge (LSM) Design
RocksDB uses an LSM database design with flexible tradeoffs between:
- Write-Amplification-Factor (WAF) - How much extra data is written compared to the original data
- Read-Amplification-Factor (RAF) - How many disk reads are needed for a single query
- Space-Amplification-Factor (SAF) - How much extra space is used beyond the actual data
Multi-threaded Compactions
Multi-threaded Compactions
RocksDB supports multi-threaded compactions, allowing it to efficiently manage databases storing multiple terabytes of data. This parallel processing capability ensures consistent performance even with large datasets.
Optimized for Flash Storage
Optimized for Flash Storage
Built specifically for modern flash drives, RocksDB leverages the characteristics of flash storage to deliver:
- High throughput for both reads and writes
- Low latency for point lookups
- Efficient space utilization
Production-Ready
Production-Ready
RocksDB powers critical infrastructure at scale:
- Used by Facebook, LinkedIn, Yahoo, and many other companies
- Handles billions of operations per day
- Battle-tested in production environments
Core Capabilities
Key-Value Store
Store arbitrary byte arrays as keys and values with ordered iteration support
Column Families
Logically partition your data while sharing the same write-ahead log
Transactions
ACID transactions with optimistic and pessimistic concurrency control
Snapshots
Point-in-time consistent views of your database
Backups
Built-in backup and restore capabilities
Compression
Multiple compression algorithms: Snappy, Zlib, LZ4, ZSTD, Bzip2
API Overview
RocksDB provides a simple and intuitive API for database operations:RocksDB is safe for concurrent access from multiple threads without any external synchronization.
Use Cases
RocksDB excels in scenarios requiring:- High-throughput writes - Web applications, logging systems, metrics collection
- Large datasets - Multi-terabyte databases with billions of keys
- Low-latency reads - Caching layers, session stores, real-time analytics
- Embedded databases - Applications needing local persistent storage without a separate database server
- Stream processing - Stateful processing in Apache Flink, Apache Kafka Streams, etc.
Performance Characteristics
RocksDB can achieve:
- Millions of operations per second on modern hardware
- Sub-millisecond p99 latencies for point lookups
- Gigabytes per second of write throughput
- Efficient storage with compression ratios of 2-5x depending on data
Community and Support
GitHub Repository
Star the project, report issues, and contribute
Community Forum
Join the RocksDB Developers Public Facebook group
Mailing List
Subscribe to the Google Groups mailing list
Wiki
Detailed documentation and design docs
Licensing
Next Steps
Ready to start using RocksDB?Install RocksDB
Follow the installation guide for your platform
Quick Start
Build your first RocksDB application with the quick start guide
Explore Examples
Learn from code examples covering common use cases
Configure for Production
Optimize RocksDB for your workload using tuning guides