Storage Abstraction and Backend Implementations
← Back to SHAMap and NodeStore: Data Persistence and State Management
Introduction
This chapter explains the NodeStore storage abstraction and available backends in Rippled. You will learn how to choose between RocksDB, NuDB, and testing backends, configure them for optimal performance, and understand the standardized encoding format that ensures backend interoperability. Practical guidance on tuning and migration is also provided to help maintain reliable and efficient ledger storage.
Quick Reference
RocksDB (Recommended)
When to use:
General-purpose validators
Balanced performance and simplicity
Standard configurations
Configuration:
[node_db]
type = RocksDB
path = /data/rippled.db
cache_size = 256Performance:
Write throughput: 10,000-50,000 objects/sec
Compression: 50-70% disk space savings
Good for: Most deployments
NuDB (High-Performance)
When to use:
High-transaction-volume networks
Maximum write throughput needed
Modern SSD storage
Configuration:
Performance:
Write throughput: 50,000-200,000 objects/sec
Optimized for: Sequential writes
Good for: Archive nodes, heavily-used validators
Testing Backends
Memory: In-memory, non-persistent (testing only)
Null: No-op backend (unit tests)
Encoding Format Reference
The standardized encoding format enables backend independence:
Structure (from Chapter 6):
This format is handled transparently by the Database layer, but understanding it is important for:
Backend implementation
Data corruption diagnosis
Migration between backends
Configuration Tuning
RocksDB Options
NuDB Options
Migration Between Backends
To migrate from one backend to another:
For Detailed Reference
See the following sections of Chapter 6:
"Backend Abstraction" - Interface design
"Supported Backends" - Feature comparison
"Data Encoding Format" - Serialization details
For implementation details, consult:
rippled/src/xrpld/nodestore/Backend.hrippled/src/xrpld/nodestore/Database.hrippled/src/xrpld/nodestore/backend/*Factory.cpp
Last updated

