Spillway Configuration
Experimental Alpha
Spillway is an experimental alpha. Its configuration, behavior and storage formats may change in future releases.
Spillway reads one YAML file, given by --config. Inside DeltaFi's Compose stack the file is <installDirectory>/config/spillway/spillway.yaml, mounted at /config/spillway.yaml (see Deployment); in the standalone stack it is the stack's config/spillway.yaml, mounted the same way.
Spillway watches the file and its directory, and reloads it a moment after each save, including saves by editors that write a new file and rename it over the old one. A file that does not load or validate is rejected: Spillway logs configuration reload rejected; keeping the running configuration, counts it in spillway_config_reload_failures_total, and keeps running on the configuration it had. In Compose the container's health check also fails while the file is invalid, because the check loads the same file (see Config drift).
The hash of the configuration Spillway runs is exported as spillway_config_hash_info{hash}, so a configuration that differs between instances is visible. A restart-only setting the file changed is held at its running value until restart, so this hash can differ from the file's own, which is exported as spillway_config_file_hash_info{hash}; spillway_restart_required is 1 while any such setting is held.
For step-by-step setups, see the Configuration Guide.
File Format
- Unknown keys are errors, so a misspelled setting is refused rather than ignored.
- Sizes are a whole number of bytes, or a whole number with a
KiB,MiB,GiBorTiBsuffix:64MiB,10GiB. - Durations are Go durations:
500ms,30s,10m,1h. outbound.retry.backoffis written<initial>..<max>, for example30s..1h.
Environment References
${NAME} anywhere in the file is replaced with the environment variable NAME before the file is parsed. A reference to a variable that is not set is an error naming it, and a $ not followed by {NAME} is kept as written.
The replacement is made in the raw text, so a value that may contain YAML-special characters such as : or # must be quoted:
instance:
id: "${POD_NAME}"Settings
Settings are global unless their path starts with channels[], which makes them per channel. Applies says when a changed value takes effect:
- live: on the next reload;
- restart: a reload keeps the running value, logs
restart required for changed settings; they keep their running values until thennaming the settings, and the new value takes effect when Spillway restarts; - refused: a reload that changes it is rejected, and the running configuration is kept.
Instance
| Setting | Effect | Default | Applies |
|---|---|---|---|
instance.id | Stable instance identity; part of every S3 key and audit object the instance writes | required | refused |
instance.cluster | Namespaces every S3 key, so installs sharing a bucket never collide. Set it before the first start: changing it later orphans the data stored under the old value | required | restart |
instance.adoptAfter | Heartbeat age after which a peer's S3 backlog is adopted. Adoption ships in V1, so this release accepts only the default 10m and refuses any other value | 10m | refused |
Inbound and Admin Listeners
| Setting | Effect | Default | Applies |
|---|---|---|---|
inbound.mode | internal: plain HTTP on DeltaFi's internal network. mtls: TLS with a client certificate required, for a standalone Spillway | internal | restart |
inbound.listen | Address the inbound listener binds | :8080 | restart |
inbound.source | internal mode: the source name recorded for every file (audit rows, source metric label) | the value of instance.cluster | live |
inbound.tls.cert, .key | mtls mode: the server certificate and key, used by the inbound and the admin listener. Read once at startup | required in mtls | restart |
inbound.tls.clientCA | mtls mode: the CA bundle client certificates must chain to, for both DeltaFi senders and operators | required in mtls | restart |
inbound.sourceSANs | mtls mode: map from a client certificate SAN (DNS SANs first, then URI SANs) to a source name | none | live |
admin.listen | Address the admin listener binds | :8081 | restart |
admin.operatorSANs | mtls mode: the client certificate SANs allowed to use /admin/ | required in mtls | live |
Metrics
| Setting | Effect | Default | Applies |
|---|---|---|---|
metrics.pushUrl | VictoriaMetrics import endpoint; Spillway pushes every 15 s | http://deltafi-victoriametrics:8428/api/v1/import/prometheus | restart |
Local Storage
| Setting | Effect | Default | Applies |
|---|---|---|---|
storage.local.path | Local volume mount | required | refused |
storage.local.softLimitPct | Local usage at which demotion to S3 starts | 50 | live |
storage.local.hysteresisPct | Demotion stops at softLimitPct − hysteresisPct; must be below softLimitPct | 5 | live |
storage.local.hardLimitPct | Local usage above which arrivals that would be stored get 503 hard limit; above softLimitPct, at most 95 | 80 | live |
storage.local.maxBytes | Byte budget for Spillway's own files on a filesystem it shares; see Bounded test layouts | unset: whole-filesystem limits | restart |
Local usage is the larger of the used fraction of the volume's bytes and the used fraction of its inodes, plus reservations for files being received. Every limit compares against it. It is measured over the whole filesystem holding storage.local.path, whatever wrote to it, and blocks reserved for root count as used, so give the local volume a disk of its own (see Deployment). With storage.local.maxBytes set, local usage is instead Spillway's own bytes against that budget, and inode use is ignored; hardLimitPct also applies to the whole filesystem.
Object Store
| Setting | Effect | Default | Applies |
|---|---|---|---|
storage.s3.endpoint | Object store URL, http:// or https:// | required | restart |
storage.s3.bucket | Bucket; created at startup if missing | required | restart |
storage.s3.credentialsFile | Env-file of AWS_ACCESS_KEY_ID=… and AWS_SECRET_ACCESS_KEY=… lines, plus an optional AWS_SESSION_TOKEN=…. Values are read as written, so they are not quoted; blank lines and # comments are ignored. The file is read again at most a minute after it changes | required | restart (the file's contents apply live) |
storage.s3.region | Signing region | us-east-1 | restart |
The packing and transfer settings, segmentTargetBytes and transferParallelism, are under Advanced: Packing and Transfers.
Audit
| Setting | Effect | Default | Applies |
|---|---|---|---|
audit.retentionDays | Age of shipped audit objects (a/ in S3) the sweeper deletes | 90 | live |
audit.maxLocalBytes | Unshipped audit journal on the local volume above which arrivals that would be stored get 503 audit backlog; pass-through continues. 0 means the default | 10% of the local volume's capacity | live |
Formats
| Setting | Effect | Default | Applies |
|---|---|---|---|
formats.minWriteVersion | Storage format version writers emit. This release has one format version, so it must be 1; any other value is refused | 1 | refused |
Channels
| Setting | Effect | Default |
|---|---|---|
channels[].id | Channel id: URL path /c/<id>, S3 prefix and metric label. Lower-case letters, digits and -, not starting with -, at most 63 characters. Never change it: a new id is a new channel | required |
channels[].metadataKey | Header holding HttpEgress's metadata JSON. Must equal the sink's metadataKey | X-DeltaFi-Metadata |
channels[].dataSink | Data sink name recorded for uploads that name none: DeltaFiEgress uploads, and HttpEgress and FlowFile uploads without a flow | the channel id |
channels[].sources | mtls mode: the source names (from inbound.sourceSANs) allowed to send to the channel | required in mtls |
channels[].stripHeaders | Headers stripped at ingest and never stored, in addition to Authorization, Cookie and Proxy-Authorization | none |
channels[].maxFileSize | Largest file accepted; larger files get 413 | 10GiB |
channels[].maxStreams | Concurrent inbound requests on the channel, pass-through and spill together; above it new requests get 503 stream cap. The instance accepts at most 4 × the sum over channels inbound connections | 32 |
channels[].responseBudget | Longest wait for the consumer after the body ends during a pass-through; must be below DeltaFi's 10 s response timeout, so Spillway answers DeltaFi before DeltaFi gives up. A larger value is refused at startup | 8s |
channels[].retentionHours | Undelivered files older than this age off, with aged_off audit rows | 336 (14 days) |
channels[].passThrough.mode | auto, always, or never (every file spills) | auto |
channels[].passThrough.maxTime | auto: longest predicted pass-through time, consumer latency plus size ÷ bandwidth. Pass-through is the fast path for consumers answering within this time; a slower consumer is buffered | 50ms |
channels[].passThrough.maxBytes | Largest file eligible for pass-through; 0 is unlimited | unlimited |
channels[].passThrough.memoryBytes | Files up to this size pass through a memory buffer, so a consumer failure still ends in a local commit and a 200; at most 16 MiB and at most maxFileSize | 1MiB |
channels[].passThrough.bypassMaxAge | Live arrivals may bypass a backlog younger than this | 1h |
channels[].passThrough.reservedSlots | Delivery slots backlog delivery leaves free for live arrivals; 0 disables; must be below outbound.maxConnections | the smaller of 2 and maxConnections − 1 |
channels[].passThrough.idleTimeout | Outbound idle timeout during pass-through; must be below responseBudget, which is itself below DeltaFi's 10 s. A value at or above it is refused at startup | 5s |
channels[].passThrough.spillNextTtl | How long a DID whose large-file pass-through failed spills on resend from the same data sink; the DID from another data sink is routed as usual | 1h |
channels[].outbound.url | Consumer endpoint: an http or https URL that names a host. Any other scheme, or a URL with no host such as https://:8443/ingest, is refused | required |
channels[].outbound.auth | At most one of clientCert: {cert, key}, basic: {user, passwordFile} or bearer: {tokenFile}, plus an optional ca bundle. The files are read at startup and again every 10 seconds, so a file replaced in place, renamed over or swapped by a Kubernetes Secret update applies within about 20 seconds, with no restart or configuration change: a change is used once two reads in a row agree. New connections use the new files; connections already open finish on the old ones. A client certificate key must be unencrypted. Files that fail to load (a missing file, a half-written certificate, a key that does not match its certificate, an encrypted key, an empty password or token file, or a CA bundle with a block that is not a whole certificate or with bytes after its last certificate) are refused at startup and rejected on a reload: Spillway logs outbound credential reload rejected; keeping the channel's running credentials with the channel, counts it in spillway_config_reload_failures_total, and keeps using the files it had | none |
channels[].outbound.maxConnections | Outbound connection cap for the channel on this instance. The default suits only small sites; see Sizing | 8 |
channels[].outbound.adaptive.latencyTarget | The adaptive limit halves when the consumer's response latency exceeds this; at least 1ms | 500ms |
channels[].outbound.timeouts.connect, .idle, .response | Connect timeout; idle timeout per read and write when delivering from the backlog; wait for the response after the body is sent | 2s, 60s, 60s |
channels[].outbound.breaker.failures, .openFor, .probeEvery | Consecutive consumer-scoped failures that open the breaker; how long it stays open before the first probe; time between probes | 5, 30s, 30s |
channels[].outbound.retry.maxAttempts, .backoff | File-scoped attempts before the DLQ; retry delay range, doubling | 10; 30s..1h |
channels[].outbound.successStatuses | Extra consumer statuses treated as delivered, such as 409 from consumers that report duplicates; no 3xx | none |
channels[].outbound.passThroughStatuses | Consumer statuses returned to DeltaFi as they came during pass-through, and sent to the DLQ from the backlog; 4xx only | 400, 413, 415, 422 |
channels[].outbound.breakerStatuses | Consumer statuses that open the breaker as a misconfiguration | 401, 403, 404, 405 |
A status may appear in only one of successStatuses, passThroughStatuses and breakerStatuses.
Every channel setting applies live. A reload that changes a channel's outbound or passThrough settings rebuilds that channel: it gets new clients, reading its credential files at once, and its adaptive limit and breaker start over. Its queue, spill-next set and, unless outbound.url changed, its latency and bandwidth estimates carry over. Other channels are untouched.
Channels Sharing a Volume
Channels that store files on the same local volume share it equally, with nothing to set. Each channel holding files gets the same fair share of the soft limit's demotion target, softLimitPct − hysteresisPct of the volume's capacity: at the defaults, two channels holding files get 22.5% each. Files a channel promoted from S3 and has not yet delivered count toward its share for promotion and admission, but do not count toward the excess demoted from it.
- Demotion. Above
softLimitPct, Spillway demotes paused channels and channels whose breaker is open first, oldest files first. Next it demotes each delivering channel's files beyond its share, the channel furthest over first, newest files first. Only then does it demote the newest files of every delivering channel. A channel whose consumer is slow but still accepting files gives up its own excess, so another channel's burst stays local and keeps passing through. - Promotion. Unless a channel's oldest files are close to aging off, or its next segment alone is
softLimitPctof the volume or more, a promotion never lifts usage tosoftLimitPct. BetweensoftLimitPct−hysteresisPctandsoftLimitPct, a channel promotes from S3 while its next segment keeps what it holds within its share, so a channel's files demoted during a burst come back while another channel holds the volume near its target. A channel that is the only one holding files keepssoftLimitPct−hysteresisPctas its promotion limit, since usage also counts files no channel holds, such as other data on the filesystem. A channel over its share does not promote there, unless its oldest files are close to aging off; that promotion is still bounded by the hard limit. FromsoftLimitPct−hysteresisPct, a segment ofsoftLimitPctor more promotes, up to the hard limit, only while it keeps what the channel holds within its share, or into a channel holding nothing. With the defaults this share check cannot hold such a segment back, since the hard limit stops it first. - Admission. From
hardLimitPct−hysteresisPctup tohardLimitPct(75% to 80% at the defaults), a new local-tier file from a channel over its share gets 503fair share, which DeltaFi resends; channels under their share are admitted up to the hard limit. A channel whose backlog Spillway has not yet counted, as just after a restart, counts as over its share there. A channel is admitted up to the hard limit when no other channel holds files on the volume, since the band keeps room only for other channels.
In the fluid simulation, two channels share a 100 GB volume at the defaults while channel A's consumer runs at half its arrival rate for a day and healthy channel B bursts to ten times its rate for ten minutes at hour 12. B passes 95.9% of its files through, spills 32.6 GB and delivers every file within 1.2 hours; slow A passes 6.7% through, spills 719.3 GB with a maximum age of 18.5 hours, and gets no 503 responses.
Example
A channel inside DeltaFi, sending with DeltaFi's plugins certificate:
channels:
- id: consumer-a
metadataKey: X-DeltaFi-Metadata
maxStreams: 32
retentionHours: 336
passThrough:
mode: auto
outbound:
url: https://consumer-a.example/ingest
maxConnections: 16
auth:
clientCert: { cert: /certs/tls.crt, key: /certs/tls.key }
ca: /certs/ca.crt
successStatuses: [409]Advanced: Packing and Transfers
The defaults suit every documented site; change them only after a sizing run, see Sizing.
| Setting | Effect | Default | Applies |
|---|---|---|---|
storage.s3.segmentTargetBytes | Segment packing size; at most 1 GiB; also the most memory one salvaging promote stream holds; a file at least this size goes in a segment of its own | 64MiB | live, from the next demote job |
storage.s3.transferParallelism | Concurrent segment uploads plus promotion jobs, across all channels; one channel's demotion can use all of them. 1 to 64 | 8 | live |
Adding and Removing Channels
Adding a channel to the file and saving it starts the channel at once; it never changes another channel's limits. DeltaFi sinks can then send to /c/<id>.
Removing a channel is refused, keeping the running configuration, while the channel still holds anything:
- files on the local volume (local, retry or DLQ), or segments in S3 under this instance's prefix;
- a backlog Spillway has not finished counting since startup, or an S3 backlog it has not finished listing;
- a demote or promote job in progress;
- any S3 backlog at all while the object store is unreachable, since it cannot be counted.
While a reload removes a channel, the channel's arrivals get 503 removing; a refused reload lets them in again. A channel with nothing left is removed by the reload.
Abandoning a Channel
To remove a channel that still holds data, start Spillway with --abandon <channel> (repeatable). Its data is then aged off with aged_off audit rows instead of delivered:
- A channel removed by a reload. Start Spillway with
--abandon <channel>, then remove the channel from the file. The reload ages off its local and S3 backlog. It is refused while the object store is unreachable or the channel's S3 backlog is still loading; retry it once the store answers. - A channel already missing from the file at startup. A channel that has entries under
local/,retry/ordlq/but is not configured refuses startup, naming the channel, unless--abandonnames it. With--abandon, Spillway starts and ages off the channel's local data, then, once the object store is reachable, its S3 segments. Until that ends, a reload cannot add the channel back.
So while the object store is unreachable, a reload cannot remove a channel at all; edit the file and restart with --abandon instead. Remove --abandon from the command line once the channel is gone, so that a later reload removing a channel of that name is checked again. See Orphaned channel data for setting the flag in Compose.
Open-File Budget
At startup, and on every reload, Spillway computes the open files its configuration needs and refuses to start, or rejects the reload, when RLIMIT_NOFILE is lower:
RLIMIT_NOFILE is 1024; this configuration needs at least 8654 open files (spec §6.1)The budget is:
5 × Σ maxStreams 4 inbound connections and 1 inflight file per stream permit
+ Σ (4 × maxConnections + 2) per channel: outbound connections and payload files, 2 directories
+ 1024 × transferParallelism promotion staging
+ 268 age-off workers and fixed slackA configuration with no channels still counts 4 × 32 inbound connections. A configuration with one channel at its defaults needs 8,654, and each channel added at the defaults adds 194. No limit covers every valid configuration, since maxStreams, maxConnections and the number of channels are unbounded. The Compose service, inside DeltaFi and in the standalone stack, sets nofile to 1,048,576; to fit under a lower limit, lower transferParallelism, maxStreams or maxConnections.
Command Line
spillway --config <file> [--abandon <channel>]... [--shutdown-delay <duration>]
spillway --version
spillway health --config <file>
spillway resume-policies --action <egress action> [--method POST] [--method PUT] [--name <policy>]| Flag or command | Effect |
|---|---|
--config | The configuration file; required |
--abandon <channel> | Age off the channel's data with audit rows when a reload removes it, or at startup when it is not configured (repeatable) |
--shutdown-delay | How long readiness fails on shutdown before the listeners stop; default 5s. Then uploads still sending their body get 503 shutdown, and requests already committing get up to 30 s to finish |
--version | Prints spillway <version> and exits |
health | Container health probe: exits 0 when the admin listener's /readyz answers 200 within 3 s, and 1 otherwise. It loads the same configuration file, and dials the configured admin.listen host, or 127.0.0.1 when that binds every interface |
resume-policies | Prints the DeltaFi auto-resume policies for a Spillway-backed sink; see Resume Policies |
Exit code 2 is a usage error, such as a missing --config or an invalid --abandon channel id; 1 is a failed start.

