Bondy Connect
Skip to content

Data Storage & Active Anti-entropy Configuration Reference ​

Bondy's storage layer is bondy_db: a sharded key/value facade with per-table CRDT semantics, backed by bondy_oplog (per-shard write-ahead log, Merkle Search Tree anti-entropy, and the applier that maintains materialised projections). Durable tables persist to a leveled LSM-tree store. Bondy provisions exactly two databases: main (durable — security, realms, the API gateway, tickets/tokens) and registry (ephemeral, in-memory — registrations and subscriptions).

Concept: see Architecture for how sharding, replication, and convergence fit together. This page covers the full db.* configuration surface: sharding and placement, pack-store durability, and anti-entropy sync.

No in-place migration from pre-1.0.0 releases

This storage stack replaces PlumDB/RocksDB entirely. There is no in-place migration — see Upgrading to 1.0.0.

Sharding and Placement ​

db.main.shard_count :: integer
Default = 16Since v1.0.0

The shard count for the durable main database, applied when the catalogue first provisions it. Each shard is an independent replicated unit with its own write-ahead log, Merkle Search Tree, and projection.

db.registry.shard_count :: integer
Default = 16Since v1.0.0

The shard count for the ephemeral registry database (registrations and subscriptions), independent of db.main.shard_count. The registry has no on-disk topology manifest, so it carries no partition strategy, realm-prefix depth, or topology-mismatch setting, since those all concern durable, on-disk keying. Its only other settings are the history retention bounds under Instance Memory Management.

db.main.partition_strategy :: aggregate|realm|entity
Default = aggregateSince v1.0.0

How a (realm, key) write maps to one of db.main.shard_count shards. This sets both the write-atomicity grain (entities sharing a shard are written in one atomic batch) and which reads are shard-local versus scatter-gather. main-only — registry has no partition-strategy knob:

  • aggregate (recommended) — shard = hash of (realm, aggregate_root). A subject's record, grants, and memberships co-locate, giving atomic per-subject writes, while subjects spread across all shards so a single realm still uses every shard. Realm-wide listings scatter-gather.
  • realm — shard = hash of a realm-URI prefix (depth set by db.main.realm_prefix_depth). A realm's whole dataset lives on one shard, enabling single-shard realm scans, but a single busy realm collapses onto one shard — suited to many-small-realm fleets only.
  • entity — shard = hash of (entity_type, key). Maximum write parallelism, with no cross-entity atomicity (the pre-bondy_db behaviour).

Topology-defining

partition_strategy is frozen in the on-disk topology manifest at first provision. Changing it on a populated node requires a re-key: export, wipe the data directory, reimport. See db.main.on_topology_mismatch below.

db.main.realm_prefix_depth :: integer
Default = 1Since v1.0.0

Only used when partition_strategy = realm: the number of leading dot-separated realm-URI components that share a shard. 1 shards per realm; 2 co-locates e.g. org.acme.sso with org.acme.app. Also topology-defining, main-only.

Keying Topology Safety ​

db.main.on_topology_mismatch :: warn|stop
Default = warnSince v1.0.0

Boot behaviour when the on-disk topology manifest disagrees with the configured topology (partition_strategy, shard_count, realm_prefix_depth, or a table's shard key). On-disk data is keyed under the manifest's topology, so a changed configuration cannot simply be applied without a re-key. main-only — registry is ephemeral, has no manifest, and cannot mismatch.

  • warn — log a loud warning naming the diverging keys and keep running on the on-disk topology; the new configuration is not applied.
  • stop — refuse to boot. Recommended for production, so a topology change is never silently ignored.

Pack Store and Durability ​

db.oplog.pack.auto_seal_bytes :: bytesize
Default = 2MBSince v1.1.0

Byte threshold at which a durable shard's pack-store MST seals its incoming pack into a sealed pack. The seal rewrites the whole incoming pack in one fsync'd pass; its cost scales linearly with this threshold. The pack store's native 16MB behaviour produces seal freezes of 600ms or more — large enough to push read-after-write freshness lag toward the authentication fence's default window (db.oplog.aae.fence.max_lag, 1s) and trigger spurious authentication refusals. The 2MB default keeps each freeze to tens of milliseconds at no throughput or hot-read cost, since reads are served from the projection and cache, never the MST directly. A smaller value seals more often into more sealed packs, adding only anti-entropy/compaction/cold-boot work. Global — applies to every durable shard node-wide, not a specific database.

db.oplog.pack.seal_mode :: async|sync
Default = asyncSince v1.1.0

Seal driver for the durable shard pack-store MST. async rolls the incoming pack aside at the commit barrier and rewrites it into a sealed pack on a monitored worker, keeping the (multi-hundred-millisecond) rewrite off the write path entirely — measured roughly 44% lower p99 apply latency versus the inline alternative. It does not change durable write throughput, which is bounded by disk fsync bandwidth regardless of where the seal runs. sync restores the historical inline behaviour (the store seals on put at the threshold). Affects only durable shards — ephemeral instances never seal. Global, like db.oplog.pack.auto_seal_bytes.

db.leveled.journal.trim_interval :: duration_time_units
Default = 1hSince v1.1.0

Interval at which Bondy trims each durable leveled store's journal back to the files still needed to recover the ledger. Bondy opens every durable store in leveled's head_only mode. In that mode each write lands twice: the whole cell in the ledger, and the same object specs, payload included, in the journal. The journal exists only to recover the ledger after an unclean stop; no read path reads it. Leveled never reclaims this journal on its own in head_only mode.

A trim drops the journal files strictly older than the one holding the ledger's persisted sequence number. A clean restart would not replay that history, so trimming it costs no durability. Leveled deletes a dropped file only once no snapshot can still read it, so disk space returns a few seconds after each pass. The pass scans the journal manifest and rewrites nothing, so it is cheap; the interval only sets how promptly disk space returns. Global — applies to every durable store node-wide.

Setting 0 lets the journal grow without bound

0 disables the trim. The journal then keeps every version of every cell ever written, while the ledger holds only the live set, so disk use grows with cumulative writes for as long as the node runs.

Pack Collection ​

A durable shard never changes a Merkle Search Tree page in place. Each write adds new copies of the pages on its path to the root, and each compaction truncation unlinks subtrees. A page that the current root no longer reaches stays in the sealed packs until a pack collection removes it.

A pack collection rewrites the sealed packs of one shard. It keeps every page that the current root reaches, and every page of a root that a running sync session has pinned. It writes the kept pages to one new sealed pack, then deletes the packs it replaced. The incoming pack is not touched.

The garbage in the sealed packs grows with the number of writes, not with the size of the live data. A write burst, such as a restore from a backup, can therefore make the pack store many times larger than the data it holds. A pack collection cannot remove history that compaction has not yet truncated. A member that is down holds that history on every shard, as The compaction witnesses and the truncation cap describes.

When a collection runs ​

Each shard checks on its compaction tick, at most once per second. A collection is due when either trigger holds:

  • Time trigger: db.oplog.pack.gc.interval has passed since the last collection.
  • Volume trigger: the sealed packs hold at least db.oplog.pack.gc.growth_factor × B page records. B is the record count that the last collection left, or db.oplog.pack.gc.min_records if that is larger.

When a seal is in flight, the shard retries on its next tick. After every collection, including one that dropped nothing, the shard resets the clock and B.

The first tick after a node starts records the clock and B and does not collect. A shard that reopens with many sealed packs would otherwise stall on a full rewrite while it comes up. The volume trigger applies from the second tick, so a write burst after a start is collected before the interval ends.

A collection is the most expensive operation a shard runs. The shard's oplog instance runs it in its own process, so the instance handles no other request, a write included, until the collection finishes. The time trigger is coarse for that reason. The volume trigger spreads the cost over the writes that made it due: the shard rewrites once for each db.oplog.pack.gc.growth_factor-fold growth of the sealed packs.

A collection needs free disk space

A collection writes the new sealed pack before it deletes the packs it replaces, so it needs free space for every page it keeps. A shard on a full disk cannot collect. Size the volume for the largest write burst you expect, a restore included.

Settings ​

Each setting applies to every durable shard on the node.

db.oplog.pack.gc.interval :: duration_time_units
Default = 1hSince v1.1.0

The time trigger: the longest time between two collections of a shard. The value has to be greater than zero.

db.oplog.pack.gc.growth_factor :: integer
Default = 2Since v1.1.0

The volume trigger: a collection is due once the sealed packs hold this many times the page records that the last collection left. The value has to be at least 2. With 1, the record count that a collection leaves would make the next collection due at once.

db.oplog.pack.gc.min_records :: integer
Default = 10000Since v1.1.0

The smallest base that the volume trigger multiplies, in page records. A shard with few sealed records therefore does not collect on every small burst of writes. The value has to be at least 1.

A shard reads these settings on every compaction tick. To change one on a running node without a restart, attach a shell with bondy-connect remote_console and set the application environment key that it maps to:

bondy.conf keyApplication environment keyUnit
db.oplog.pack.gc.intervalbondy_oplog.durable_gc_interval_msmilliseconds
db.oplog.pack.gc.growth_factorbondy_oplog.durable_gc_growth_factorinteger
db.oplog.pack.gc.min_recordsbondy_oplog.durable_gc_min_recordspage records
erlang
application:set_env(bondy_oplog, durable_gc_interval_ms, 600000).

The change applies from the next tick. A restart restores the value from bondy.conf.

The volume trigger is new in v1.0.2. In earlier releases, only the time trigger ran, and the first collection of a shard came one hour after the node started. In v1.0.2, the settings exist only as the application environment keys in the table above, so set them in advanced.config or on a running node. The bondy.conf keys are new in v1.1.0.

bondy_mst_page_store_gc_runs_total, bondy_mst_page_store_gc_packs_retired_total and bondy_mst_page_store_gc_freed_bytes_total count the collections and what they freed. See Metrics.

Instance Memory Management ​

db.oplog.heap_gc.interval :: duration_time_units
Default = 2sSince v1.1.0

Interval at which each oplog instance checks its own heap and fullsweep-hibernates it if growth has exceeded db.oplog.heap_gc.delta over its post-GC baseline. This reclaims transient apply/anti-entropy garbage that a long-lived instance would otherwise retain until the next major GC — most visibly during a solo import with no peers, where the anti-entropy-driven hibernate never fires. 0 disables the monitor. Global — applies to every oplog instance node-wide, not a specific database.

db.oplog.heap_gc.delta :: bytesize
Default = 16MBSince v1.1.0

Heap-growth threshold above an instance's post-GC baseline that triggers the periodic monitor above. Keying on growth over the live baseline, rather than absolute heap size, avoids GC-thrashing an instance with a large live MST: it fires once per roughly this many bytes of accumulated garbage, capping the transient peak at approximately live + this. Lower trades a touch more fullsweep work for a tighter memory ceiling. Global, like db.oplog.heap_gc.interval.

Registry History Retention ​

Each shard of the ephemeral registry database keeps an op-log history: the Merkle Search Tree events that anti-entropy compares and exchanges. Normally peer-confirmed compaction bounds that history. Compaction truncates only events every peer already holds, so it never strands a lagging peer. The two keys below are an overload backstop. They truncate history locally whether peers have confirmed it or not, and both are off by default. They apply only to registry; durable databases are never retention-bounded.

db.registry.retention.max_age_ms :: integer
Default = 0Since v1.0.0

Retention window for registry history, in milliseconds. When peer-confirmed compaction has nothing to truncate, a shard truncates history older than this window. A peer that lags past the window can no longer catch up from history and must re-bootstrap from the catalogue. 0 disables the age bound. Enable it only when sustained overload demonstrably outruns peer-confirmed compaction.

db.registry.retention.max_events :: integer
Default = 0Since v1.0.0

Event-count bound, per shard, for registry history. When a shard's live history exceeds this many events, the shard truncates its whole applied history at the next compaction tick (every second), independent of db.registry.retention.max_age_ms. This keeps a write burst from outrunning the age window. Peers within one anti-entropy round keep their own copies; a peer that lags further must re-bootstrap from the catalogue. 0 disables the size bound. With both keys at 0, peer-confirmed compaction alone bounds history.

Write-Ahead Log ​

db.oplog.wal.fsync_mode :: per_write|batched
Default = per_writeSince v1.1.0

Fsync driver for the durable write-ahead log. per_write fsyncs every append, bounding the writer to the storage device's fsync rate (roughly 6,000 ops/s on typical NVMe) but guaranteeing each write is durable before it returns — required for security-class namespaces (grants, tickets, users). batched defers fsync to a size or time boundary (db.oplog.wal.batched_fsync_bytes / db.oplog.wal.batched_fsync_interval) and exposes durability via an explicit wait instead of the append call returning; it reaches roughly two orders of magnitude higher throughput at the cost of a bounded durability window. Global — affects every durable oplog instance node-wide; the ephemeral registry in-memory WAL never fsyncs and ignores this.

db.oplog.wal.max_segment_bytes :: bytesize
Default = 64MBSince v1.1.0

Rotation threshold for the durable WAL's head segment. The writer rotates to a fresh segment once the next frame would push the head past this size; rotation fsyncs the sealed segment and advances the durable position. Global, like db.oplog.wal.fsync_mode.

db.oplog.wal.batched_fsync_interval :: duration_time_units
Default = 50msSince v1.1.0

Batched-mode fsync time trigger: the writer fsyncs at most this long after the first un-fsynced append. Only consulted when db.oplog.wal.fsync_mode = batched. Global, like db.oplog.wal.fsync_mode.

db.oplog.wal.batched_fsync_bytes :: bytesize
Default = 1MBSince v1.1.0

Batched-mode fsync size trigger: the writer fsyncs once accumulated un-fsynced bytes exceed this threshold. Only consulted when db.oplog.wal.fsync_mode = batched. Global, like db.oplog.wal.fsync_mode.

db.oplog.drain.stall_alarm :: duration_time_units
Default = 1mSince v1.1.0

How long a per-shard WAL drain may actively process frames without committing any new consumer position before Bondy raises a bondy_oplog_drain_stalled alarm (visible via /metrics and cleared automatically once the drain progresses again). This guards against a wedged or endlessly-re-reading log consumer on a node that anti-entropy would otherwise still report as converged. 0 disables the detector.

db.oplog.frontier.hole_alarm :: duration_time_units
Default = 5mSince v1.1.0

How long a shard may carry a hole in its applied frontier before Bondy raises a bondy_oplog_frontier_hole alarm. A hole is a run of one origin's sequence numbers that this replica never received, while later sequences from the same origin are already applied. The replica holds its reported frontier below the hole. Peers therefore keep re-offering that origin, and the shard's Merkle Search Tree cannot truncate past the hole.

Short-lived holes are routine: a local WAL commit lands out of sequence order, or a missing sequence is one anti-entropy round away. The alarm therefore fires on the age of a hole, not on its occurrence. Keep this value well above db.oplog.aae.interval. The bondy_oplog_instance_frontier_holes gauge shows current holes without waiting for the alarm. 0 disables the detector and clears any alarm it raised.

The detector runs whether db.oplog.aae is on or off. A node with anti-entropy off is more likely to carry a standing hole, not less.

Index Reads ​

db.index.primary_scan_limit :: integer
Default = 1000000Since v1.1.0

Maximum number of primary cells one stale-index fallback read may enumerate. When a secondary index is stale, Bondy answers the query by scanning every primary cell in the realm and recomputing each value's index terms. This limit stops that scan from running unbounded. Size it to the number of cells in your largest realm. Global — applies to every database node-wide.

A scan that reaches the limit returns incomplete results

When the scan reaches the limit, Bondy returns the cells it has read so far and logs a warning naming the realm and the limit. The caller is not told that the result may be incomplete. If a realm holds more cells than this limit, raise it.

Active Anti-entropy ​

Bondy's storage layer converges leaderlessly: peers compare Merkle Search Tree root hashes and exchange only the divergent pages, rather than comparing every key. A sync scheduler discovers peers from the live Partisan cluster membership and runs sync sessions over a dedicated Partisan channel, converging each node's view of every replicated table — security (users/grants), realms, the API gateway, the registry, and more.

Concept: see Convergence for what a sync round does, how a replica that is genuinely behind is detected, and what the repair costs; and Clustering for how this fits into cluster formation.

db.oplog.aae :: on|off
Default = onSince v1.1.0

Master switch for active anti-entropy. The sync scheduler process always runs, but with this off, no Partisan peer source is wired in, so the scheduler has no peers and stays inert. A node with cluster.enabled = off never wires a peer source, and the authentication freshness fence (below) always certifies it.

db.oplog.aae.interval :: duration_time_units
Default = 500msSince v1.1.0

Interval between sync scheduler ticks. Each tick, the scheduler asks the peer source for peers and dispatches sync sessions. Only relevant when db.oplog.aae is on.

Live-Sync Throttling ​

db.oplog.aae.live_sync :: on|off
Default = onSince v1.1.0

Slows the live syncs of a shard whose data has settled. A live sync is the sync of a shard that already holds data; it pulls only the pages the shard is missing. When this option is on, a shard syncs at the tick interval while its data changes. Once its data settles, the scheduler doubles the interval between its syncs, up to db.oplog.aae.live_sync.max. The first change resets the shard to the tick interval. When this option is off, every live shard syncs on every tick. A shard that backs the authentication freshness fence always syncs on every tick, so this option never delays authentication.

Known limitation. Every shard that a Bondy node starts backs the authentication freshness fence. On a Bondy node this option therefore has no effect: the scheduler starts a live sync for every shard on every tick.

db.oplog.aae.live_sync.max :: duration_time_units
Default = 5sSince v1.1.0

The longest interval between the live syncs of a shard whose data has settled. Changes propagate by pull only, so this value is also the longest time such a shard takes to learn of a change on a peer. Set it below the convergence time you need. Only relevant when db.oplog.aae and db.oplog.aae.live_sync are both on. On a Bondy node this option has no effect; see the known limitation of db.oplog.aae.live_sync.

Concurrency and Memory ​

db.oplog.aae.max_concurrency :: integer
Default = 3Since v1.1.0

The number of live sync sessions that can run at once on this node. Two kinds of session are outside this limit:

The value also sets the size of a round. A session pulls db.oplog.aae.max_pages_in_flight divided by this value pages in each round, so a higher value makes each round smaller.

Known limitation. Every shard that a Bondy node starts backs the authentication freshness fence. On a Bondy node this option therefore does not limit how many live syncs run. It only sets the size of a round.

db.oplog.aae.max_pages_in_flight :: integer
Default = 2048Since v1.1.0

Budget, in MST pages, for anti-entropy reconciliation in flight. This option bounds the memory that anti-entropy uses: a session pulls missing pages in rounds of max_pages_in_flight / max_concurrency pages, whatever the size of the dataset. The sessions that db.oplog.aae.max_concurrency limits hold about this many pages between them. Each session outside that limit can add one more round of that size. A larger value syncs faster and uses more memory at the peak.

Bootstraps ​

A bootstrap is the snapshot transfer that brings a shard to the state of a peer. A shard needs one when it holds no data, or when it cannot catch up from the history its peers still keep. A node that restarts bootstraps the shards of the in-memory registry, which holds the routing table.

db.oplog.aae.bootstrap.max_concurrency :: integer
Default = 4Since v1.2.1

The number of bootstraps that can run at once on this node. db.oplog.aae.max_concurrency does not apply to bootstraps, so a node that recovers can run up to this many sessions above that limit. A higher value rebuilds the routing table sooner, and puts more snapshot work on the peers that serve it. 0 stops new bootstraps.

db.oplog.aae.bootstrap.serve.max_concurrency :: integer
Default = 8Since v1.2.1

The number of bootstraps this node serves to other nodes at once. The node refuses a request above this number, and the asking node asks again after its retry backoff. The serving node counts each refusal in bondy_oplog_bootstrap_serve_refused_total. A bootstrap whose asking node stopped counts until it expires, 60 seconds after its last request. 0 serves none.

Load-Adaptive Yielding ​

db.oplog.aae.load_adaptive :: on|off
Default = offSince v1.1.0

Makes the scheduler yield to node load. On every tick the scheduler compares a load signal with db.oplog.aae.load_run_queue_threshold. While the signal is at or above the threshold, the scheduler does not start the live syncs of a shard that does not back the authentication freshness fence. It starts bootstraps and the live syncs of fence-backing shards as usual, and it does not stop a session that runs. It starts the deferred syncs on the next tick below the threshold.

Known limitation. Every shard that a Bondy node starts backs the authentication freshness fence. On a Bondy node this option therefore defers nothing. bondy_oplog_sync_scheduler_yielding still reports when the load is at or above the threshold.

db.oplog.aae.load_run_queue_threshold :: float
Default = 2.0Since v1.1.0

Run-queue length per online scheduler, smoothed across ticks, at or above which the scheduler yields. The scheduler yields only when db.oplog.aae.load_adaptive is on. The signal is erlang:statistics(run_queue) divided by the online scheduler count: the average number of ready processes queued per scheduler. A healthy node stays near 0–1. A sustained 2 or more means that work queues faster than the schedulers drain it. bondy_oplog_sync_scheduler_load exports the signal whether or not the option is on.

Peer Sampling ​

db.oplog.aae.fanout :: integer
Default = 3Since v1.1.0

Number of peers the sync scheduler samples from the Partisan cluster membership each tick.

Authentication Freshness Fence ​

Because Bondy's storage layer has no consensus round, a partitioned node could otherwise authenticate against a stale view of the security tables. The freshness fence closes that gap.

db.oplog.aae.fence.max_lag :: duration_time_units
Default = 60sSince v1.1.0

The freshness bound for the fence. A node refuses new authentication when its view of the security tables (users/grants) has not been confirmed within this window — bounding how stale a credential or permission change a node may authenticate against. A completed anti-entropy round confirms freshness. A local write does not, so a node cut off from its peers stops authenticating under db.oplog.aae.fence.on_isolation = refuse, however much it writes. Lower is tighter security (a lagging node refuses sooner); higher favours availability under partition or lag. Only relevant when db.oplog.aae is on — the fence is otherwise a no-op, since local writes are synchronous.

Do not set this near the anti-entropy tick period. The anti-entropy rounds that confirm freshness are background work, and their completion stretches whenever the node is busy. A bound of about 1s therefore refuses authentication in bulk during a burst of session opens, with no actual staleness involved. Revocation of a single user's credentials does not depend on this bound: it is handled separately, by the per-user token version and by invalidating cached RBAC state when replicated changes arrive.

db.oplog.aae.fence.on_isolation :: refuse|proceed|quorum
Default = refuseSince v1.1.0

What the fence does on a node with clustering enabled that currently cannot confirm freshness with any peer — partitioned into a minority, cold-started before its first anti-entropy round completes, or running with no other member at all. A node with cluster.enabled = off is not governed by this policy: it has no peer to lag, so it always authenticates.

A lone node with clustering enabled is refused under refuse

A single node that keeps the default cluster.enabled = on has no peer to confirm its freshness, so under refuse it refuses every authentication. Set cluster.enabled = off on a node meant to run alone; see Enabling clustering.

  • refuse (secure default) — fail closed: refuse all new authentication until a peer round confirms freshness. A node restarting into an established cluster refuses only until its first sync round, typically sub-second.
  • proceed — treat unreachable peers as vacuously fresh and keep authenticating. Most available, but during a partition a stale minority node could accept a token revoked elsewhere until it heals. Not recommended for a security fence.
  • quorum — certify freshness, and so authenticate, only while connected to a majority of the expected cluster membership; a minority partition refuses even if it can still sync internally. Secure and available for the majority side. Requires a Partisan cluster.
db.oplog.aae.fence.alarm :: duration_time_units
Default = 5mSince v1.1.0

How long the fence may refuse every new authentication before the node raises the bondy_auth_fence_closed alarm. The node checks the fence every 10 seconds. It raises the alarm when the fence refuses and no anti-entropy round has refreshed the users and grants within this time. It clears the alarm when the fence admits again. The fence is closed at every boot until the first anti-entropy round, so the node does not raise the alarm until it has been up for this long. 0 disables the alarm. Only relevant when db.oplog.aae is on.

Storage Engine (leveled) ​

The db.leveled.* keys are passed to every durable leveled store this node starts. They are advanced tuning keys, and most deployments leave them at their defaults. Each default is leveled's own, except db.leveled.cache_size, which keeps the 2000 Bondy has always used. The keys are global, like db.wal.*. The ephemeral registry database keeps its projection in memory and starts no leveled store, so none of them apply to it.

A leveled store has two parts. The ledger is an LSM tree of keys and their current values, maintained by the penciller. The journal is an append-only log of writes, used only to recover the ledger after an unclean stop. Bondy opens every store in leveled's head_only mode, in which leveled never compacts the journal; db.leveled.journal.trim_interval is what bounds it.

Caches ​

db.leveled.cache_size :: integer
Default = 2000Since v1.0.0

Size, in objects, of the ledger cache: the in-memory buffer of recent ledger additions, flushed to the penciller when full. Larger values reduce pressure on the penciller and use more memory. Leveled ignores values below 100, and adds random jitter to the configured value so that stores do not flush in lockstep.

db.leveled.cache_multiple :: integer
Default = 2Since v1.0.0

Multiple of db.leveled.cache_size beyond which the ledger cache does not grow, even while the penciller is busy. On reaching it, every write returns a pause. This applies back-pressure to the writer instead of letting memory grow without bound.

db.leveled.penciller_cache_size :: integer
Default = 28000Since v1.0.0

Maximum number of keys the penciller holds in memory before it writes a new level-zero file to disk. Larger values mean fewer, bigger level-zero writes and more memory held.

db.leveled.ledger_preload_pagecache_level :: integer
Default = 4Since v1.0.0

Ledger level at and above which leveled preloads files into the OS page cache when it opens them. Higher values preload more of the tree, trading memory and startup work for lower first-read latency.

db.leveled.max_merge_below :: integer|infinity
Default = 24Since v1.0.0

Maximum number of ledger files a single file may be merged into. With fewer overlapping files than this in the level below, the merge runs in full; at or above it, the merge is partial. infinity never bounds the merge. Leveled is tested at the default. Change it only when tuning under measurement.

Journal ​

db.leveled.max_journal_size :: bytesize
Default = 1000000000Since v1.0.0

Maximum size of one journal file, in bytes (the default is 10^9 bytes). Leveled starts a new file when the current one reaches this size or db.leveled.max_journal_objects, whichever comes first. The absolute ceiling is 4GB, set by leveled's 4-byte file pointers. The value applies only to files started after a change; existing files are not rewritten.

This key bounds the size of each file, not the number of files. In head_only mode the journal records the payload of every write, so it holds every version ever written. db.leveled.journal.trim_interval bounds the total.

db.leveled.max_journal_objects :: integer
Default = 200000Since v1.0.0

Maximum number of objects in one journal file. This is the companion bound to db.leveled.max_journal_size; each file stays within both.

db.leveled.sync_strategy :: none|sync
Default = noneSince v1.0.0

Whether leveled flushes to disk after every write. none lets the operating system schedule the flush. sync forces a flush per write, which is markedly slower unless the hardware absorbs it (a battery-backed write cache).

This key governs the durable projection, not the write-ahead log. A write is already durable in the WAL before it reaches leveled; db.oplog.wal.fsync_mode governs that. With none, Bondy fsyncs the leveled journal itself before it truncates the log or checkpoints anything a write was claimed to cover.

Journal Compaction ​

The following four keys are accepted but have no effect. Journal compaction never runs: leveled accepts compaction only for stores not in head_only mode, and Bondy opens every store in head_only mode. The descriptions state what each key would control if compaction ran.

db.leveled.waste_retention_period :: off|duration_secs
Default = offSince v1.0.0

How long leveled would keep journal files after compacting them. off keeps no such files. A period would keep them, so the store could be restored to an earlier point in time, at the cost of the disk they occupy.

db.leveled.max_run_length :: default|integer
Default = defaultSince v1.0.0

How many journal files one compaction run could include. default uses leveled's built-in run length of 8.

db.leveled.singlefile_compaction_percentage :: float
Default = 30.0Since v1.0.0

Compaction score at or below which a single journal file would be eligible for compaction on its own. Lower values make single-file compactions rarer, favouring longer runs.

db.leveled.maxrunlength_compaction_percentage :: float
Default = 70.0Since v1.0.0

Compaction score a full-length run would need to be eligible. Raising it, or lowering db.leveled.singlefile_compaction_percentage, makes leveled prefer a long run over a short one.

db.leveled.journal_compaction_score_one_in :: integer
Default = 1Since v1.0.0

How often a journal file would be scored. 1 scores every file on every run. A value of n scores a given file on roughly one run in n and uses a cached score otherwise.

Compression ​

db.leveled.compression_method :: lz4|native|zstd|none
Default = lz4Since v1.0.0

Compression algorithm for stored values. none disables compression. native uses the Erlang term compressor. lz4 and zstd trade CPU for space, zstd more aggressively than lz4.

db.leveled.compression_level :: integer
Default = 1Since v1.0.0

Compression level, used when db.leveled.compression_method is zstd. Higher values compress harder and cost more CPU.

db.leveled.compression_point :: on_receipt|on_compact
Default = on_receiptSince v1.0.0

When leveled compresses journal records. on_receipt compresses each record as it arrives, spending CPU on the write path to keep the journal small. on_compact defers compression to journal compaction, which never runs in Bondy. With on_compact, journal records therefore stay uncompressed. This key governs the journal only; the ledger uses db.leveled.ledger_compression.

db.leveled.ledger_compression :: as_store|native|lz4|zstd|none
Default = as_storeSince v1.0.0

Compression for the ledger. as_store follows db.leveled.compression_method. The other values override it for the ledger alone, for when the ledger and the journal need different trade-offs.

Snapshots ​

A snapshot pins the files it was opened against. A snapshot that is never released holds disk space that would otherwise be reclaimed; these timeouts bound that.

db.leveled.snapshot_timeout_short :: duration_secs
Default = 15mSince v1.0.0

How long a short-lived snapshot may stay open before leveled releases it.

db.leveled.snapshot_timeout_long :: duration_secs
Default = 12hSince v1.0.0

The same bound for snapshots registered as long-running, such as full-store folds.

Logging and Statistics ​

db.leveled.log_level :: debug|info|warning|error|critical
Default = infoSince v1.0.0

Minimum severity at which leveled logs. It is independent of Bondy's own log level, because leveled is verbose at debug.

db.leveled.stats_percentage :: integer
Default = 10Since v1.0.0

Percentage of operations leveled samples for its internal timing statistics. Sampling keeps the cost of statistics off the hot path. Raising it gives more precise numbers at more cost.

db.leveled.stats_log_frequency :: duration_secs
Default = 30sSince v1.0.0

How often leveled logs its accumulated timing statistics.

Deprecated and Removed Keys ​

Every storage-related bondy.conf key was renamed or removed when 1.0.0 replaced the storage engine — see Upgrading to 1.0.0 for the full migration procedure. The old keys are kept here, greyed out, so a key you remember from an earlier release is still findable on this page rather than silently gone.

Renamed in 1.1.0 ​

The keys of the operation log moved under db.oplog., grouped by the component they configure: anti-entropy, write-ahead log, pack store, heap collection, compaction, the frontier and drain alarms, reclamation and origin retirement. The journal trim moved under db.leveled.journal., and the primary scan limit under db.index.. A 1.1.0 node refuses to start on an old name, and the error names the new key. Run scripts/migrate_conf.escript check from the Bondy repository on your bondy.conf before you upgrade: it lists each old key with its new name.

Deprecated db.primary_scan_limit renamed todb.index.primary_scan_limitsince v1.1.0
Deprecated db.journal_trim_interval renamed todb.leveled.journal.trim_intervalsince v1.1.0
Deprecated db.aae renamed todb.oplog.aaesince v1.1.0
Deprecated db.aae.fanout renamed todb.oplog.aae.fanoutsince v1.1.0
Deprecated db.aae.fence.alarm renamed todb.oplog.aae.fence.alarmsince v1.1.0
Deprecated db.aae.fence.max_lag renamed todb.oplog.aae.fence.max_lagsince v1.1.0
Deprecated db.aae.fence.on_isolation renamed todb.oplog.aae.fence.on_isolationsince v1.1.0
Deprecated db.aae.interval renamed todb.oplog.aae.intervalsince v1.1.0
Deprecated db.aae.live_sync renamed todb.oplog.aae.live_syncsince v1.1.0
Deprecated db.aae.live_sync.max renamed todb.oplog.aae.live_sync.maxsince v1.1.0
Deprecated db.aae.load_adaptive renamed todb.oplog.aae.load_adaptivesince v1.1.0
Deprecated db.aae.load_run_queue_threshold renamed todb.oplog.aae.load_run_queue_thresholdsince v1.1.0
Deprecated db.aae.max_concurrency renamed todb.oplog.aae.max_concurrencysince v1.1.0
Deprecated db.aae.max_pages_in_flight renamed todb.oplog.aae.max_pages_in_flightsince v1.1.0
Deprecated db.gc_max_concurrency renamed todb.oplog.compaction.max_concurrencysince v1.1.0
Deprecated db.drain.stall_alarm renamed todb.oplog.drain.stall_alarmsince v1.1.0
Deprecated db.frontier.hole_alarm renamed todb.oplog.frontier.hole_alarmsince v1.1.0
Deprecated db.gc_heap_delta renamed todb.oplog.heap_gc.deltasince v1.1.0
Deprecated db.gc_interval renamed todb.oplog.heap_gc.intervalsince v1.1.0
Deprecated db.origin_retirement renamed todb.oplog.origin_retirementsince v1.1.0
Deprecated db.origin_retirement.interval renamed todb.oplog.origin_retirement.intervalsince v1.1.0
Deprecated db.origin_retirement.path renamed todb.oplog.origin_retirement.pathsince v1.1.0
Deprecated db.pack_auto_seal_bytes renamed todb.oplog.pack.auto_seal_bytessince v1.1.0
Deprecated db.pack_seal_mode renamed todb.oplog.pack.seal_modesince v1.1.0
Deprecated db.reclaim renamed todb.oplog.reclaimsince v1.1.0
Deprecated db.reclaim.batch_cells renamed todb.oplog.reclaim.batch_cellssince v1.1.0
Deprecated db.reclaim.interval renamed todb.oplog.reclaim.intervalsince v1.1.0
Deprecated db.wal.batched_fsync_bytes renamed todb.oplog.wal.batched_fsync_bytessince v1.1.0
Deprecated db.wal.batched_fsync_interval renamed todb.oplog.wal.batched_fsync_intervalsince v1.1.0
Deprecated db.wal.fsync_mode renamed todb.oplog.wal.fsync_modesince v1.1.0
Deprecated db.wal.max_segment_bytes renamed todb.oplog.wal.max_segment_bytessince v1.1.0

In each case the value and its meaning are unchanged; only the key name moved.

Renamed in 1.0.0 ​

The oplog. prefix became db.. Four keys additionally drop their core. segment, since they were never specific to one database, and four more move from oplog.core.* to db.main.*, since the durable database itself was renamed from core to main. Each entry links to the key's current name, after the 1.1.0 renames above.

Deprecated oplog.aae renamed todb.oplog.aaesince v1.0.0
Deprecated oplog.aae.interval renamed todb.oplog.aae.intervalsince v1.0.0
Deprecated oplog.aae.live_sync renamed todb.oplog.aae.live_syncsince v1.0.0
Deprecated oplog.aae.live_sync.max renamed todb.oplog.aae.live_sync.maxsince v1.0.0
Deprecated oplog.aae.max_concurrency renamed todb.oplog.aae.max_concurrencysince v1.0.0
Deprecated oplog.aae.max_pages_in_flight renamed todb.oplog.aae.max_pages_in_flightsince v1.0.0
Deprecated oplog.aae.load_adaptive renamed todb.oplog.aae.load_adaptivesince v1.0.0
Deprecated oplog.aae.load_run_queue_threshold renamed todb.oplog.aae.load_run_queue_thresholdsince v1.0.0
Deprecated oplog.aae.fanout renamed todb.oplog.aae.fanoutsince v1.0.0
Deprecated oplog.aae.fence.max_lag renamed todb.oplog.aae.fence.max_lagsince v1.0.0
Deprecated oplog.aae.fence.on_isolation renamed todb.oplog.aae.fence.on_isolationsince v1.0.0
Deprecated oplog.core.gc_interval renamed todb.oplog.heap_gc.intervalsince v1.0.0
Deprecated oplog.core.gc_heap_delta renamed todb.oplog.heap_gc.deltasince v1.0.0
Deprecated oplog.core.pack_auto_seal_bytes renamed todb.oplog.pack.auto_seal_bytessince v1.0.0
Deprecated oplog.core.pack_seal_mode renamed todb.oplog.pack.seal_modesince v1.0.0
Deprecated oplog.core.shard_count renamed todb.main.shard_countsince v1.0.0
Deprecated oplog.core.partition_strategy renamed todb.main.partition_strategysince v1.0.0
Deprecated oplog.core.realm_prefix_depth renamed todb.main.realm_prefix_depthsince v1.0.0
Deprecated oplog.core.on_topology_mismatch renamed todb.main.on_topology_mismatchsince v1.0.0

In each case the value and its meaning are unchanged — only the key name moved.

Removed ​

These keys have no replacement. A 1.0.x node ignores each of them without reporting it, because the release generates its configuration with cuttlefish --allow_extra. From 1.1.0, a node refuses to start on any of them. They are listed here so that their disappearance is not mistaken for an oversight.

Removed oplog.catalog Never had a consumersince v1.0.0
Removed oplog.core.scan_max_concurrency Never wired to any code pathsince v1.0.0
Removed store.* PlumDB and RocksDB tuning; bondy_db on leveled replaced bothsince v1.0.0

In 1.0.0-rc.65 and earlier, the store.* keys configured PlumDB and its RocksDB backend. The leveled backend that replaced RocksDB has its own tuning keys, db.leveled.* (see Storage Engine (leveled)), which are not one-to-one replacements for store.*.

The key below took effect only in the 1.0.0 pre-releases that carry bondy_db.

Removed db.compaction.peer_timeout Compaction waits for every cluster member and has no timeoutsince v1.0.0

Compaction on every database waits for every cluster member, however long the member stays silent, so there is no timeout to set. See Convergence. A bondy.conf that still sets db.compaction.peer_timeout boots, and the key has no effect.

See also ​