Skip to main content

RocksDB Types and Usage Scenarios

RocksDB provides multiple engine types to support different workloads. Choosing the right type is critical to achieving optimal performance for your application.


1. RocksDB Engine Types

RocksDB mainly offers the following types:

TypeDescriptionTypical Scenario
Default DBStandard key-value store with LSM (Log-Structured Merge Tree) engineGeneral-purpose storage, small to medium datasets, embedded KV
TransactionDBDefault DB with ACID transactions, supports atomic commitsControl-plane metadata, multi-key atomic updates, small transactional datasets
OptimisticTransactionDBLightweight transaction engine using optimistic concurrencyHigh-read, low-write scenarios, concurrent readers, small transactional workloads
PlainTable / Universal / ColumnFamilySpecialized storage formats or logical partitioningHigh read amplification workloads, columnar storage, large datasets, complex query patterns

2. Typical Usage Scenarios

2.1 Default DB

  • Suitable for general-purpose KV storage
  • No transactional guarantees
  • Recommended for high throughput writes and bulk storage of structured data

2.2 TransactionDB

  • Provides full ACID transactions
  • Useful for metadata, configuration, and control-plane KV
  • Supports atomic multi-key updates
  • Typical in Kumo when you need strong consistency guarantees

2.3 OptimisticTransactionDB

  • Optimized for concurrent read-heavy workloads
  • Uses optimistic concurrency control
  • Recommended for small transactional updates where conflicts are rare

2.4 Other types (PlainTable / ColumnFamily / Universal)

  • Used in specialized performance scenarios
  • ColumnFamily allows logical separation of key spaces
  • PlainTable can reduce read amplification for very large datasets
  • Usually for big-data analytics or log storage scenarios

Summary

  • Selecting the correct RocksDB type is key for performance and reliability
  • For general KV → Default DB
  • For transactional control-plane KV → TransactionDB / OptimisticTransactionDB
  • For high-performance analytical or specialized workloads → ColumnFamily / PlainTable

Next sections will cover configuration, backup, and snapshot strategies, with practical examples.