cockroachdb/cockroach
Disaggregated storage
CockroachDB can offload its deepest LSM levels to shared cloud object storage. The on-node Pebble database keeps L0–L4 hot, while L5/L6 SSTables move to S3/GCS/Azure and are referenced by every replica that owns them.
Why
Inter-AZ replication traffic dominates infra cost on cloud platforms. Shared storage lets multiple replicas of the same range read the same SST without re-pushing it across the network at compaction time. Disaster recovery and bulk operations also benefit — a snapshot or restore can re-link existing files instead of re-shipping them.
Code
pkg/storage/shared_storage.go— engine-level entry: register a remote storage and tell Pebble to use it for new SSTs above a configured level.pkg/storage/external_sst_reader.go— read SSTs that live outside the local LSM.pkg/cloud/— adapters for cloud object stores (S3, GCS, Azure, NFS, …) used here and by backup, IMPORT, changefeeds.- Pebble's "shared storage" support (upstream) is the engine-side counterpart.
Cluster settings
Selected knobs (current names may change; check pkg/storage/storage_config.go and pkg/cloud/):
storage.shared_storage— URI and options.storage.shared_storage.uploads.batch_size— batching at compaction.- Per-store
--shared-storageflag oncockroach start.
Related pages
- Storage — the engine layer.
- features/backup-restore — biggest beneficiary.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.