block-quote On this pagechevron-down
copy Copy chevron-down
Core Dev Bootcamp chevron-right Anatomy of Rippled: SHAMap and NodeStore Storage Abstraction and Backend Implementations ← Back to SHAMap and NodeStore: Data Persistence and State Management
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
Configuration:
Copy [node_db]
type = RocksDB
path = /data/rippled.db
cache_size = 256 Performance:
Write throughput: 10,000-50,000 objects/sec
Compression: 50-70% disk space savings
Good for: Most deployments
When to use:
High-transaction-volume networks
Maximum write throughput needed
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)
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:
Data corruption diagnosis
Migration between backends
Configuration Tuning
RocksDB 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.h
rippled/src/xrpld/nodestore/Database.h
rippled/src/xrpld/nodestore/backend/*Factory.cpp
Last updated 3 months ago