Spillway Configuration Guide
Experimental Alpha
Spillway is an experimental alpha. Its configuration, behavior and storage formats may change in future releases.
This guide is ordered by task: each section is a checklist for one thing you want to set up or change. It links to the page that explains each step rather than repeating it. Configuration is the full reference for every setting, its default and whether it applies on reload or at restart.
Spillway reloads spillway.yaml on save, so most recipes need no restart. The checks that call spillway_admin and $ADMIN use the helpers defined in Reaching the Admin API. The limits and defaults the recipes mention are listed in Limits and Defaults.
First Channel Inside DeltaFi
This sets up Spillway in DeltaFi's Compose stack with one channel and one data sink that sends to it.
Choose the identity before the first start. Create
<installDirectory>/config/spillway/spillway.yamlwith your owninstance.idandinstance.clusterfirst, becauseinstance.clusternames every S3 key and changing it later orphans the stored data. See Before the First Start. Skip this step to use the defaults,deltafi-spillwayandcompose.Enable Spillway in
site/values.yamlwithdeltafi.spillway.enabled: true, givespool_dira disk of its own and puts3_diron a different filesystem, then rundeltafi up. See Enabling Spillway.Add the channel under
channels:in<installDirectory>/config/spillway/spillway.yamland save. Adding a Channel has the minimal channel for DeltaFi's plugins certificate, and the configuration example is a fuller one.Load a data sink that sends to
http://deltafi-spillway:8080/c/<channel>, with ametadataKeyequal to the channel's. See Pointing a Data Sink at Spillway.Load the sink's resume policies, so a 503 or a Spillway restart becomes a DeltaFi retry. See Resume Policies below.
Check it worked. The reload is logged, and the channel's status shows how deliveries are going:
bashdocker logs deltafi-spillway 2>&1 | grep -E 'configuration reloaded|configuration reload rejected' | tail -1 spillway_admin "$ADMIN/admin/channels/consumer-a"configuration reloadedmeans the channel is running;configuration reload rejectedmeans the file did not validate and the log line names why. A closed breaker alone says little, because a channel starts closed. Send a file through the data sink:"breaker": "closed"withbacklog.local.filesandbacklog.retry.filesnear 0 means the consumer keeps up (files pass through), and the Flow row of the Spillway dashboard shows the producer and consumer rates (see Monitoring).
Standalone Spillway with mTLS
This sets up a Spillway host apart from DeltaFi, next to the consumers, with its own object store, metrics and Grafana.
Put
server.crt,server.keyandca.crtin the stack'scerts/directory. The server certificate must name the host that DeltaFi connects to, the key must be unencrypted, andca.crtis the CA that the sending DeltaFi's client certificate and the operators' certificates chain to. See Certificates to Supply.Edit the stack's
config/spillway.yaml. Set your owninstance.idandinstance.clusterbefore the first start, map each sender's certificate SAN to a source name ininbound.sourceSANs, list at least oneadmin.operatorSANsentry, and give each channel thesourcesit accepts:yamlinstance: id: spillway-east cluster: standalone-east inbound: mode: mtls tls: cert: /certs/server.crt key: /certs/server.key clientCA: /certs/ca.crt sourceSANs: deltafi-prod.example: deltafi-prod admin: operatorSANs: [ops.example] storage: local: path: /spool s3: endpoint: http://s3proxy:9000 bucket: spillway credentialsFile: /secrets/spillway-s3.env channels: - id: consumer-a sources: [deltafi-prod] outbound: url: https://consumer-a.example/ingestThe
storageblock shown is the stack's own object store; the stack's file already has it, so edit the identity, the SANs and the channels there. Inmtlsmode Spillway refuses to start withoutadmin.operatorSANs, and refuses a channel withoutsources.Bring the stack up with
make standalone-up, or on a host without network access extract the bundle, add the certificates and run./setup.sh. See Bringing It Up.Point the DeltaFi data sink at
https://<spillway host>:8443/c/<channel>, with ametadataKeyequal to the channel's. DeltaFi needs no certificate change, because its egress actions present the certificatedeltafi sslinstalls. See Pointing a Data Sink at Spillway and load the sink's resume policies.Plan certificate rotation. Replacing
server.crt,server.keyorca.crtneedsdocker compose restart spillway; outbound credentials reload without one. See Credential rotation.Check it worked. Ask the admin listener with an operator certificate, as Reaching the Admin API shows for standalone:
bashspillway_admin "$ADMIN/admin/channels/consumer-a" make standalone-statusA channel object answers when the operator certificate chains to
ca.crtand one of its SANs is inadmin.operatorSANs; 401client certificate requiredor 403operator not allowedsays which of the two is wrong. A DeltaFi send that gets 403source not allowedhas a certificate SAN thatinbound.sourceSANsdoes not map to a source in the channel'ssources.
Several Channels on One Volume
Channels that store files on the same local volume share it equally, and there is nothing to set. This recipe is what to do and expect when you add a second channel.
Add the second channel to
channels:and save, as in Adding a Channel. Adding a channel never changes another channel's limits.Size the volume for both channels together, as in Sizing Rules. The shares come from
softLimitPct−hysteresisPct: at the defaults two channels holding files get 22.5% each. See Channels Sharing a Volume.Expect the behavior near the hard limit. From 75% to 80% usage at the defaults, a channel over its share gets 503
fair share, which DeltaFi resends through the resume policies of that channel's sink, while a channel under its share is still admitted. A slow channel gives up its own excess before a healthy channel's burst is touched.Make sure each channel's data sink has its own resume policies, named after that sink's egress action.
Check it worked. Each channel answers on its own:
bashspillway_admin "$ADMIN/admin/channels"Both channels appear in
channels. Filter the Spillway dashboard'schannelvariable to compare them, and watchspillway_rejected_total{reason="fair_share"}, the 503 refusals by reason panel: it stays at 0 until usage reaches the band. See Refusal Reasons and the SOPs Consumer slow and Promotion blocked for a channel that holds more than its share.
AWS S3 Instead of s3proxy
Use AWS S3 when demoted data must survive power loss of the host, which s3proxy's filesystem backend does not guarantee. See Choosing an Object Store.
Create a bucket for Spillway and an IAM credential scoped to that bucket only. Use SSE-S3, or SSE-KMS with bucket keys.
Put the credential in
spillway-s3.envas unquotedAWS_ACCESS_KEY_ID=…andAWS_SECRET_ACCESS_KEY=…lines:<installDirectory>/config/secrets/spillway-s3.envinside DeltaFi,secrets/spillway-s3.envin the standalone stack. Neitherdeltafi upnorsetup.shoverwrites it.Point the object store settings at the bucket. This is a fragment of
spillway.yaml; the rest of the file stays as it is:yamlstorage: s3: endpoint: https://s3.us-east-1.amazonaws.com region: us-east-1 bucket: spillway-prod credentialsFile: /secrets/spillway-s3.envSpillway addresses the bucket path-style, so use the regional endpoint. These settings apply at restart, although the credential file's contents apply live.
In the standalone stack, remove the
s3proxyservice fromcompose.yamlandspillway's dependency on it. Inside DeltaFi thespillway-s3proxyservice keeps running idle with its copy of the credential, so scope the credential to the Spillway bucket. See AWS S3 Instead of s3proxy.Restart Spillway.
Check it worked. Spillway probes the object store at startup and logs the verdict:
bashdocker logs deltafi-spillway 2>&1 | grep -E 'object store probe passed|object store (unreachable|answers incorrectly)' | tail -1object store probe passed; the S3 tier is availablemeans the bucket, endpoint and credential work.object store unreachable; running local-only and re-probingmeans Spillway could not reach the store or was refused, so recheck the endpoint, region, bucket and credential.object store answers incorrectly; running local-only and re-probingmeans a background re-probe, after a start that could not reach the store, found it answering wrongly; the same answer at the first probe stops Spillway from starting at all. In both of these cases Spillway runs local-only and probes again./readyzansweringokdoes not tell the two apart, because it is ready once the probe has any verdict, including a store that is unreachable. Then open the S3 row of the Spillway dashboard: S3 requests shows 2xx codes by operation and no run of errors (see Monitoring). Thes3figure in a channel'sbacklogcounts only segments whose footer has been read.
Sizing Disk, Connections and Threads
Size from the workload, not the defaults: the default maxConnections of 8 suits only small sites. This recipe walks the rules in Sizing Rules in order, using the values of the worked example, which serves one channel from one core-actions replica at λ = 965 files/s × 200 KB = 193 MB/s.
| Input | Formula | Example value |
|---|---|---|
Soft limit, softLimitPct, for the longest slow episode served without S3 | soft ≥ (λ − μ_slow) × T_slow | 50% of the 9,264 GB volume is 4,632 GB; with the consumer down (μ_slow = 0), T_slow = 4,632 GB ÷ 193 MB/s = 24,000 s, about 6.7 h |
Hard − soft gap, from hardLimitPct − softLimitPct, for an S3 outage while the consumer is also down | hard − soft ≥ λ × T_S3outage | 193 MB/s × 14,400 s (4 h) = 2,779.2 GB, which at the default 30% gap needs a volume of 2,779.2 GB ÷ 0.30 = 9,264 GB |
maxConnections, from the drain rate μ and the consumer's mean delivery time W | maxConnections ≥ μ × W ÷ 0.7 | μ = 2λ = 1,930 files/s, W = 20 ms: 1,930 × 0.020 ÷ 0.7 = 55.1, so maxConnections: 56 |
DeltaFi egress threads, deltafi action concurrency set | threads × replicas ≥ λ_pass × W + λ_spill × R_commit | Burst: λ_pass = 2λ = 1,930 files/s and λ_spill = λ_peak − λ_pass = 4,847 − 1,930 = 2,917; 1,930 × 0.020 + 2,917 × 0.001 = 41.5, so 42, before headroom |
maxStreams | ≥ the sink's egress threads across replicas ÷ Spillway instances | 42 × 1 ÷ 1 = 42 |
transferParallelism | ≥ ⌈(μ − λ) ÷ one promote stream's rate⌉ + 1 | ⌈193 ÷ 172⌉ + 1 = 3; the default 8 covers it |
| Open files | 5 × Σ maxStreams + Σ (4 × maxConnections + 2) + 1,024 × transferParallelism + 268 | 5 × 42 + (4 × 56 + 2) + 1,024 × 8 + 268 = 8,896 |
Measure or estimate λ, the peak λ_peak, the consumer's drain rate μ and its mean delivery time W. For a consumer you cannot measure, use the worked example's assumptions as a first guess and correct them from the dashboard.
Choose the volume from the soft-limit and gap rows. Put it on its own disk, formatted XFS or ext4 with
-i 4096. See Single-Instance Target and Durability Profiles.Set the channel's connection and stream counts. This is a fragment of a channel, with the limits left at their defaults:
yamlchannels: - id: consumer-a maxStreams: 42 outbound: url: https://consumer-a.example/ingest maxConnections: 56Raise DeltaFi's egress threads, which are shared by every sink of the HttpEgress class:
bashdeltafi action concurrency set org.deltafi.core.action.egress.HttpEgress 42Check the host's open-file limit against the budget. The Compose service sets 1,048,576; see Open-File Budget.
Check it worked. A reload that does not fit the budget is rejected with the number it needs. With traffic flowing:
bashspillway_admin "$ADMIN/admin/channels/consumer-a" deltafi action concurrency listIn the channel's status,
limitandinUseshow the adaptive connection limit and slots busy:inUsenearlimitfor long stretches saysmaxConnectionsis the bottleneck.projections.catchupSecondsshows the catch-up time of a backlog, and"promotionBlocked": falseshows that promotion is not stalled. The list shows 42 for HttpEgress, with its source as an override. The stream cap shows as 503stream capin the 503 refusals by reason panel; none meansmaxStreamsis high enough.
Outbound Authentication
A channel authenticates to its consumer with at most one of a client certificate, basic authentication or a bearer token, plus an optional CA bundle for a consumer certificate that DeltaFi's trust does not cover. Each of these is a fragment of one channel's outbound.
Choose one method, and put its files where Spillway can read them. Inside DeltaFi, DeltaFi's plugins certificate is mounted at
/certsand its key must be unencrypted. The password and token files need a mount of their own. Mount a directory, not the file itself: a single-file bind mount keeps seeing the old file when a rotation renames a new one over it. For example, aconsumer-bdirectory holdingpasswordand aconsumer-cdirectory holdingtoken, mounted inside DeltaFi with this fragment ofsite/compose.yaml(in the standalone stack, add the same two lines to thespillwayservice'svolumesincompose.yaml), and thendeltafi up:yamlservices: deltafi-spillway: volumes: - /etc/deltafi/consumer-b:/secrets/consumer-b:ro - /etc/deltafi/consumer-c:/secrets/consumer-c:roThis is a fragment of a Compose file, and the host paths are examples.
Set the channel's
outbound.auth. A client certificate with DeltaFi's plugins certificate, as inside DeltaFi (in the standalone stack/certsholds Spillway's own server certificates, so mount the sending certificate elsewhere):yamlchannels: - id: consumer-a outbound: url: https://consumer-a.example/ingest auth: clientCert: { cert: /certs/tls.crt, key: /certs/tls.key } ca: /certs/ca.crtBasic authentication, with the password in a file:
yamlchannels: - id: consumer-b outbound: url: https://consumer-b.example/ingest auth: basic: { user: spillway, passwordFile: /secrets/consumer-b/password }A bearer token, with the token in a file:
yamlchannels: - id: consumer-c outbound: url: https://consumer-c.example/ingest auth: bearer: { tokenFile: /secrets/consumer-c/token }Save. A reload that changes
outboundrebuilds the channel: it reads its credential files at once, and its adaptive limit and breaker start over.To rotate a credential later, replace the files in place or by rename, which needs the directory mount above, or by updating the Kubernetes Secret. Spillway reads them every 10 seconds and uses a change once two reads agree, within about 20 seconds, with no restart. See Credential rotation.
Check it worked. After step 3, the reload is logged, and a reload whose credential files fail to load is rejected:
bashdocker logs deltafi-spillway 2>&1 | grep -E 'configuration reloaded|configuration reload rejected' | tail -1 spillway_admin "$ADMIN/admin/channels/consumer-a"configuration reloadedmeans the channel was rebuilt with its credentials;configuration reload rejectednames the file that did not load. Send a file, and deliveries succeed when"breaker": "closed"andbacklog.retrystays at 0. After a rotation in step 4, the periodic refresh logs the change:bashdocker logs deltafi-spillway 2>&1 | grep -E 'outbound credentials reloaded|outbound credential reload rejected' | tail -5outbound credentials reloadednames the channel; arejectedline means the new files do not load, and the channel keeps its running credentials. A breaker that opens right after a change usually means the consumer answers 401 or 403, which Spillway treats as a misconfiguration; see Consumer misconfigured.
Pausing a Consumer for Maintenance
Pause the channel before its consumer goes down. A paused channel delivers nothing and sends no probes, its arrivals spill to the local volume, and it raises no mismatch ticket.
Check that the outage is affordable. A paused channel's data demotes first above the soft limit, so with S3 healthy the window need not fit between the limits. It needs S3 capacity of at least λ × the window, the window plus catch-up inside
retentionHours, and, if S3 may also be down, a hard − soft gap of at least λ × the S3 outage. See the S3 capacity and hard − soft gap rows of Sizing Rules and its retention check.Pause the channel before the maintenance starts:
bashspillway_admin -X POST "$ADMIN/admin/channels/consumer-a/pause"During the maintenance, watch storage and retention as in Consumer down for long.
Resume the channel afterwards, and watch the Catch-up time panel:
bashspillway_admin -X POST "$ADMIN/admin/channels/consumer-a/resume"Check it worked. Read the channel's status after each call:
bashspillway_admin "$ADMIN/admin/channels/consumer-a"After the pause,
"paused": trueand"breaker": "paused", andbacklog.local.filesgrows. After the resume,pausedis false and the backlog drains to 0 inbacklog.local,backlog.retryandbacklog.s3. The pause survives a restart. See Planned consumer maintenance.
Tuning Pass-Through
By default Spillway streams a file straight through to a consumer that answers within 50 ms and buffers the rest. These are the three adjustments sites make. Each is a fragment of one channel.
To buffer every file, for example to take DeltaFi off the consumer's response time entirely, set
passThrough.mode: never. Every file then spills, and DeltaFi gets200 {"status":"buffered","did":"<did>"}once the file is synced.To keep a flaky consumer from failing large files in flight, set
passThrough.maxBytes, the largest file eligible for pass-through. Larger files spill. This is separate frompassThrough.memoryBytes, which is the size up to which a pass-through goes through a memory buffer so that a consumer failure still ends in a local commit.For a consumer that answers 409 for a duplicate, list 409 in
outbound.successStatuses, so a duplicate counts as delivered:yamlchannels: - id: consumer-a passThrough: maxBytes: 100MiB outbound: url: https://consumer-a.example/ingest successStatuses: [409]This fragment sets
maxBytesandsuccessStatuses; formode: never, replacemaxByteswithmode: never, sincemaxByteshas no effect once every file spills. A status may appear in only one ofsuccessStatuses,passThroughStatusesandbreakerStatuses. See Channels.Remember what pass-through costs DeltaFi: HttpEgress holds an action thread until Spillway answers, for up to
passThrough.maxTime(50 ms) for a passed-through file and about a millisecond for a spilled one. See DeltaFi Thread Coupling.Check it worked. Send a file and read the channel's status:
bashspillway_admin "$ADMIN/admin/channels/consumer-a"With
mode: never,backlog.local.filesrises as files arrive before their delivery, where underautoa healthy consumer leaves it near 0. The Spilled bytes panel in the Spill, DLQ and promotion row shows the spill rate. A 409 from the consumer counts as delivered once it is insuccessStatuses, so the file leaves the channel.
Test Hosts with One Disk
For a test host where Spillway must share a filesystem with other data, bound it with a byte budget. This is not for production: production layouts give the spool a disk of its own and leave maxBytes unset.
Set
storage.local.maxBytesinspillway.yaml. In the standalone stack, uncomment the stack's existingmaxBytes:line in itsstorage.localblock, becausesetup.shfinds only an uncommentedmaxBytes:in that committed layout, and do not paste a secondstorage:block. This is a fragment, and the limits are then fractions ofmaxBytesand not of the whole filesystem:yamlstorage: local: maxBytes: 20GiBRun
deltafi upfor a Compose stack inside DeltaFi, or./setup.shfor the standalone stack. WithoutmaxBytes, both refuse a spool and an object store on one filesystem. With it they warn and continue. See Bounded test layouts.Restart Spillway if it was running, because
maxBytesapplies at restart.Check it worked. The command printed a warning and not an error, and Spillway's log does not warn that
maxBytesis too large:bashdocker logs deltafi-spillway 2>&1 | grep "storage.local.maxBytes exceeds the filesystem's capacity"No output is the good result. That warning means the whole-filesystem guard applies first; set
maxBytesbelow the filesystem's capacity, and in practice below its free space. The Local storage pressure panel shows usage against the soft and hard limit lines.
Removing or Abandoning a Channel
A channel can be removed only when it holds nothing. Otherwise its data is delivered first, or aged off with audit rows by an explicit abandon.
Point the data sink away from the channel first, so nothing arrives.
Let the channel drain. Wait until its
backlog.local,backlog.retry,backlog.dlqandbacklog.s3are all 0, or purge the DLQ if it holds files you will not replay (see Admin API).Delete the channel from
channels:and save. A removal is refused, keeping the running configuration, while the channel holds anything or while the object store is unreachable. See Adding and Removing Channels.To remove a channel that still holds data you will not deliver, start Spillway with
--abandon <channel>, then remove the channel from the file; the reload ages the data off withaged_offaudit rows. In Compose the flag is set by overriding the service's command, as Orphaned channel data shows, and applied withdeltafi up:yamlservices: deltafi-spillway: command: ["--config", "/config/spillway.yaml", "--abandon", "old-channel"]This is a fragment of
site/compose.yaml. Rundeltafi upto apply it, then remove the channel fromspillway.yaml. See Abandoning a Channel.Remove the override and run
deltafi upagain once the channel is gone, so a later reload that removes a channel of that name is checked again.Check it worked. The logs name the outcome, and the channel no longer answers:
bashdocker logs deltafi-spillway 2>&1 | grep -E "channel removed|channel abandoned|ageing off the abandoned channel's backlog failed" | tail -5 spillway_admin "$ADMIN/admin/channels/old-channel"A reload that removes the channel, with or without
--abandon, logschannel removed.channel abandonedis logged only for a channel that was already missing from the file at startup. If the age-off of an abandoned channel failed,ageing off the abandoned channel's backlog failedis logged as well, its remaining files stay, andchannel removedalone is not success: retry once the object store answers. The status call then answers 404unknown channel, andspillway_orphaned_bytesis 0 or absent.
Resume Policies
Every Spillway-backed data sink needs its own DeltaFi auto-resume policies, named after the sink's egress action. Without them a 503 from Spillway, or a Spillway restart, leaves the file errored in DeltaFi. The policies resend after a delay, up to 1,000 attempts.
Render the policies for the sink's egress action, using its
egressAction.nameand every method it sends with (POST by default):bashdocker exec deltafi-spillway /app/spillway resume-policies --action SpillwayEgress --method POST > spillway-SpillwayEgress.jsonDry-run each policy, one
--nameat a time, to see how many errored DeltaFiles it would match:bashdocker exec deltafi-spillway /app/spillway resume-policies --action SpillwayEgress --name spillway-SpillwayEgress-POST-503 > p.json deltafi auto-resume dry-run p.jsonLoad them:
bashdeltafi auto-resume load spillway-SpillwayEgress.jsonTo resume files that errored before the policies existed, run
deltafi auto-resume apply spillway-SpillwayEgress-POST-503 spillway-SpillwayEgress-POST-connection. See Loading the Policies for the full procedure.Check it worked. List the policies:
bashdeltafi auto-resume listThe list shows
spillway-SpillwayEgress-POST-503andspillway-SpillwayEgress-POST-connection. A 503 that Spillway answers then shows in DeltaFi as an error that resumes on its own, and the 503 refusals by reason panel shows the reason (see What a 503 Body Means).

