{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "sleet fleet config",
"description": "The fleet config: `sleet.toml` at the fleet root.",
"type": "object",
"properties": {
"database": {
"description": "Service settings applied to every database; a `dbs/<db>.toml`\nfile overrides them per field.",
"$ref": "#/$defs/DatabaseConfig",
"default": {}
},
"node": {
"description": "Settings every node follows.",
"$ref": "#/$defs/NodeConfig",
"default": {
"config_poll": "1m",
"heartbeat_interval": "10s",
"heartbeat_timeout": "30s"
}
}
},
"additionalProperties": false,
"$defs": {
"CompressionCodec": {
"description": "SST compression codec.",
"oneOf": [
{
"description": "Snappy.",
"type": "string",
"const": "snappy"
},
{
"description": "Zlib (deflate).",
"type": "string",
"const": "zlib"
},
{
"description": "LZ4.",
"type": "string",
"const": "lz4"
},
{
"description": "Zstandard.",
"type": "string",
"const": "zstd"
}
]
},
"CoordinatorOverrides": {
"description": "Compaction coordinator settings (SlateDB `CompactorOptions`; sleet\nalways runs the coordinator without an embedded worker).",
"type": "object",
"properties": {
"commit_compacted_interval": {
"description": "How often `Compacted` results are committed to the manifest.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"manifest_update_timeout": {
"description": "How long manifest updates are retried before giving up.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"max_concurrent_compactions": {
"description": "Maximum compactions scheduled concurrently.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"poll_interval": {
"description": "How often the coordinator polls the manifest to schedule compactions.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"scheduler": {
"description": "Size-tiered compaction scheduler settings.",
"anyOf": [
{
"$ref": "#/$defs/SchedulerOverrides"
},
{
"type": "null"
}
]
},
"worker_heartbeat_timeout": {
"description": "Reclaim a `Running` job whose worker heartbeat is older than this.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"CopierKind": {
"description": "Who moves a mirror target's data objects.",
"oneOf": [
{
"description": "sleet streams objects between the two stores itself.",
"type": "string",
"const": "builtin"
},
{
"description": "sleet computes the object list per pass and drives\n`rclone copy --files-from`.",
"type": "string",
"const": "rclone"
},
{
"description": "Bucket replication configured outside sleet ships the data\ndirectories; sleet backfills misses and commits manifests.",
"type": "string",
"const": "external"
}
]
},
"DatabaseConfig": {
"title": "sleet database config",
"description": "Per-database service settings: the `[database]` table of `sleet.toml`\nand, verbatim, the contents of a `dbs/<db>.toml` registry file. All\nfields are optional; unset fields fall through to the next precedence\nlayer.",
"type": "object",
"properties": {
"compaction-workers": {
"description": "Compaction worker settings.",
"anyOf": [
{
"$ref": "#/$defs/WorkersOverrides"
},
{
"type": "null"
}
]
},
"compactor-coordinator": {
"description": "Compaction coordinator settings.",
"anyOf": [
{
"$ref": "#/$defs/CoordinatorOverrides"
},
{
"type": "null"
}
]
},
"gc": {
"description": "Garbage collection settings.",
"anyOf": [
{
"$ref": "#/$defs/GcOverrides"
},
{
"type": "null"
}
]
},
"mirror": {
"description": "Mirror settings: named destination targets.",
"anyOf": [
{
"$ref": "#/$defs/MirrorOverrides"
},
{
"type": "null"
}
]
},
"services": {
"description": "Which services run for the database. Default: all of them. An\nexplicit empty list registers the database but runs nothing.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Service"
}
}
},
"additionalProperties": false
},
"GcDetachOverrides": {
"description": "Settings for the clone-detach GC pass (no file-age threshold).",
"type": "object",
"properties": {
"enabled": {
"description": "Set false to disable the detach pass.",
"type": [
"boolean",
"null"
]
},
"interval": {
"description": "How often the detach pass runs.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"GcDirectoryOverrides": {
"description": "GC settings for one resource directory.",
"type": "object",
"properties": {
"dry_run": {
"description": "Log deletions without performing them.",
"type": [
"boolean",
"null"
]
},
"enabled": {
"description": "Set false to disable GC for this directory.",
"type": [
"boolean",
"null"
]
},
"interval": {
"description": "How often the GC pass runs.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"min_age": {
"description": "Minimum object age before deletion.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"GcOverrides": {
"description": "Garbage collection settings, per SlateDB resource directory.",
"type": "object",
"properties": {
"compacted": {
"description": "The compacted SST directory.",
"anyOf": [
{
"$ref": "#/$defs/GcDirectoryOverrides"
},
{
"type": "null"
}
]
},
"compactions": {
"description": "The compactions directory (`.compactions` job state).",
"anyOf": [
{
"$ref": "#/$defs/GcDirectoryOverrides"
},
{
"type": "null"
}
]
},
"detach": {
"description": "Detaching clones whose parent references are no longer needed.",
"anyOf": [
{
"$ref": "#/$defs/GcDetachOverrides"
},
{
"type": "null"
}
]
},
"manifest": {
"description": "The manifest directory.",
"anyOf": [
{
"$ref": "#/$defs/GcDirectoryOverrides"
},
{
"type": "null"
}
]
},
"wal": {
"description": "The WAL directory.",
"anyOf": [
{
"$ref": "#/$defs/GcDirectoryOverrides"
},
{
"type": "null"
}
]
},
"wal_fence": {
"description": "Zero-byte WAL fence objects. Deleting fences too young can lose\nwrites; dry-run by default.",
"anyOf": [
{
"$ref": "#/$defs/GcDirectoryOverrides"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"HumanDuration": {
"description": "A duration in humantime form, e.g. \"10s\", \"5m\", \"1h 30m\".",
"type": "string",
"pattern": "^([0-9]+ *[a-zµ]+ *)+$"
},
"MirrorMode": {
"description": "How a mirror target is kept in sync.",
"oneOf": [
{
"description": "The sync pass plus the WAL tail, on a `poll` cadence with idle\nbackoff.",
"type": "string",
"const": "continuous"
},
{
"description": "One pass every `interval`; each committed manifest is a\npoint-in-time cut.",
"type": "string",
"const": "periodic"
}
]
},
"MirrorOverrides": {
"description": "Mirror settings: the `[database.mirror]` table (fleet-wide) or the\n`[mirror]` table of a `dbs/<db>.toml`.",
"type": "object",
"properties": {
"targets": {
"description": "Named mirror targets. Layers merge per target name, then per\nfield: a `dbs/<db>.toml` entry overrides the fleet-wide target\nof the same name field by field, except that `url` and\n`source_prefix` travel together (a layer that sets either\noverrides both).",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/MirrorTargetOverrides"
}
}
},
"additionalProperties": false
},
"MirrorTargetOverrides": {
"description": "One named mirror target. All fields are optional; unset fields fall\nthrough to the previous layer, then to built-in defaults.",
"type": "object",
"properties": {
"checkpoint_lifetime": {
"description": "Lifetime of the source pin checkpoint a pass holds while\ncopying; refreshed at half-life while the pass runs.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"copier": {
"description": "Who moves data objects; sleet always commits manifests.",
"anyOf": [
{
"$ref": "#/$defs/CopierKind"
},
{
"type": "null"
}
]
},
"copy_parallelism": {
"description": "Builtin copier: concurrent object copies per pass.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"disabled": {
"description": "Opt out of an inherited target. An ordinary overridable field,\nbecause per-field fall-through cannot unset a target.",
"type": [
"boolean",
"null"
]
},
"interval": {
"description": "Periodic mode: the cadence between passes.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"min_age": {
"description": "Prune deletion age floor for data objects at the target.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"mode": {
"description": "How the target is kept in sync.",
"anyOf": [
{
"$ref": "#/$defs/MirrorMode"
},
{
"type": "null"
}
]
},
"poll": {
"description": "Continuous mode: the pass and WAL tail cadence.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"retention": {
"description": "Restore-point retention; unset keeps everything.",
"anyOf": [
{
"$ref": "#/$defs/RetentionOverrides"
},
{
"type": "null"
}
]
},
"source_prefix": {
"description": "Scope the target to databases under this URL prefix (matched at\npath-segment boundaries) and map each one to `url` plus its\npath with the prefix stripped. For precedence this field and\n`url` travel together: a layer that sets either overrides both.",
"type": [
"string",
"null"
]
},
"url": {
"description": "The destination root. On its own an exact destination for one\ndatabase; with `source_prefix`, the base the stripped database\npath is appended to.",
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"NodeConfig": {
"description": "Settings every node follows. These are fleet-wide agreements: nodes\nmust judge liveness with the same timeout for placement to converge.",
"type": "object",
"properties": {
"config_poll": {
"description": "How often nodes re-read `sleet.toml` and LIST `dbs/`.",
"$ref": "#/$defs/HumanDuration",
"default": "1m"
},
"heartbeat_interval": {
"description": "How often each node writes its heartbeat object.",
"$ref": "#/$defs/HumanDuration",
"default": "10s"
},
"heartbeat_timeout": {
"description": "Nodes whose heartbeat is older than this are treated as dead.",
"$ref": "#/$defs/HumanDuration",
"default": "30s"
}
},
"additionalProperties": false
},
"RetentionOverrides": {
"description": "Restore-point retention for one mirror target.",
"type": "object",
"properties": {
"keep": {
"description": "Keep every restore point younger than this, plus the manifests\ntheir live checkpoints pin.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"SchedulerOverrides": {
"description": "Size-tiered compaction scheduler settings (SlateDB\n`SizeTieredCompactionSchedulerOptions`).",
"type": "object",
"properties": {
"include_size_threshold": {
"description": "A sorted run joins a compaction if its size is below this multiple\nof the smallest run already included.",
"type": [
"number",
"null"
],
"format": "float"
},
"max_compaction_sources": {
"description": "Maximum sources included together in one compaction.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"min_compaction_sources": {
"description": "Minimum sources included together in one compaction.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
}
},
"additionalProperties": false
},
"Service": {
"description": "A per-database service.",
"oneOf": [
{
"description": "Garbage collection.",
"type": "string",
"const": "gc"
},
{
"description": "Standalone compaction coordinator (RFC-0025).",
"type": "string",
"const": "compactor-coordinator"
},
{
"description": "Compaction workers (RFC-0025).",
"type": "string",
"const": "compaction-workers"
},
{
"description": "Mirroring to per-database targets (RFC 0002).",
"type": "string",
"const": "mirror"
}
]
},
"WorkersOverrides": {
"description": "Compaction worker settings (SlateDB `CompactionWorkerOptions` plus\n`count`).",
"type": "object",
"properties": {
"bytes_to_fetch": {
"description": "Read-ahead request size in bytes while iterating input SSTs.",
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0
},
"compactions_poll_interval": {
"description": "How often SlateDB workers poll `.compactions` for `Scheduled` jobs.\nSleet passes this value through to SlateDB's worker options.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"compression_codec": {
"description": "Compression for SSTs the worker writes. Must match the writer's\n`compression_codec`.",
"anyOf": [
{
"$ref": "#/$defs/CompressionCodec"
},
{
"type": "null"
}
]
},
"count": {
"description": "Worker nodes for this database: the top `count` nodes of the\ndatabase's rendezvous ranking poll its compaction queue.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"heartbeat_bytes": {
"description": "Bytes a worker must process before emitting a heartbeat.",
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0
},
"heartbeat_min_interval": {
"description": "Minimum wall-clock time between heartbeat writes.",
"anyOf": [
{
"$ref": "#/$defs/HumanDuration"
},
{
"type": "null"
}
]
},
"max_concurrent_compactions": {
"description": "Jobs a single worker may hold simultaneously.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"max_fetch_tasks": {
"description": "Concurrent block-fetch tasks per input SST.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"max_sst_size": {
"description": "Maximum output SST size in bytes before a new one is rolled.",
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0
},
"max_subcompactions": {
"description": "Maximum subcompactions per job (RFC-0028); values <= 1 disable\nsubcompactions.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
},
"min_filter_keys": {
"description": "Write bloom filters for SSTs with at least this many keys. Must\nmatch the writer's `min_filter_keys`.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0
}
},
"additionalProperties": false
}
}
}