Spillway Deployment
Experimental Alpha
Spillway is an experimental alpha. Its configuration, behavior and storage formats may change in future releases.
The binary and its configuration are the same in every mode; only what surrounds it differs.
Alerts need a contact point
DeltaFi's Grafana and the standalone Grafana have no contact point by default, so Spillway's tickets and pages reach no one until you add one. See Alerts.
| Mode | Provisioned by | Metrics and dashboards | Status |
|---|---|---|---|
| Compose, inside DeltaFi | The deltafi-spillway service in DeltaFi's Compose stack, enabled by deltafi.spillway.enabled | DeltaFi's VictoriaMetrics and Grafana | This release |
| Standalone Compose | A separate Compose project for a Spillway host apart from DeltaFi, make standalone-up or the airgap bundle's setup.sh | Its own VictoriaMetrics and Grafana | This release |
| Kubernetes, inside DeltaFi | Templates in the DeltaFi chart | DeltaFi's VictoriaMetrics and Grafana | V1 |
Compose Inside DeltaFi
Enabling Spillway
Spillway is off by default. Enable it in site/values.yaml and run deltafi up:
deltafi:
spillway:
enabled: true
spool_dir: "" # empty = <data dir>/spillway/spool; a relative path is under the data directory
s3_dir: "" # empty = <data dir>/spillway/s3; a relative path is under the data directory
s3proxy_image: deltafi/s3proxy:4.1.1-2| Setting | Default | Description |
|---|---|---|
enabled | false | Run the deltafi-spillway service |
spool_dir | <data dir>/spillway/spool | Host directory of Spillway's local volume, mounted at /spool. Put it on its own disk (see Durability profiles) |
s3_dir | <data dir>/spillway/s3 | Host directory for Spillway's own object store. It must be on a different filesystem from spool_dir (see the warning below) |
image | the release's deltafi-spillway image | Spillway's image |
s3proxy_image | deltafi/s3proxy:4.1.1-2 | The image of Spillway's own object store, spillway-s3proxy. It is pinned apart from DeltaFi's s3proxy, to the image Spillway is tested against |
Neither directory may be, hold, or sit inside DeltaFi's own object store directory, <data dir>/minio; deltafi up refuses such a setting with deltafi.spillway.<key> <dir> overlaps DeltaFi's object store <data dir>/minio; choose a directory outside it.
Put the spool on its own disk
Spillway's storage limits count the whole filesystem under spool_dir, whatever wrote to it, with blocks reserved for root counting as used. With the default spool_dir under DeltaFi's data directory, DeltaFi's own data counts too: on a disk already above softLimitPct (default 50%) Spillway demotes everything it can and promotes nothing back, so a backlog in S3 waits until usage falls, and above hardLimitPct (default 80%) every file it would store gets 503 hard limit. Give spool_dir a disk of its own, or set the limits for the disk it shares.
Put the object store on a different filesystem from the spool
Demotion moves a segment from spool_dir to s3_dir. When both are on one filesystem, the move leaves usage where it was: Spillway demotes everything above softLimitPct, gains no capacity, and answers 503 hard limit at the local capacity alone. With neither setting changed, both default under DeltaFi's data directory and share its filesystem, so set s3_dir (or spool_dir) to a directory on another disk. deltafi up refuses the two on one filesystem unless storage.local.maxBytes is set (see Bounded test layouts).
Nothing of Spillway's is created until it is enabled. Then deltafi up:
- creates the spool and object-store directories;
- writes the object store credential as a pair of files,
<installDirectory>/config/secrets/spillway-s3.envfor Spillway andspillway-s3proxy.envfor its object store. Their values are unquoted. They are generated as a pair when both are absent. An existing file is never overwritten, so a credential written inspillway-s3.env, such as an AWS one, is kept; a missing file is written again from the other, so the two agree. A directory at either path, which Docker leaves when it bind-mounts a missing file, is an error: remove it and rundeltafi upagain; - writes the default configuration to
<installDirectory>/config/spillway/spillway.yaml, with no channels, only if that file does not exist.deltafi upnever overwrites it.
The default configuration points storage.s3.endpoint at http://spillway-s3proxy:9000, Spillway's own object store service (see The Service). It never shares DeltaFi's content store: its image, credential and data directory are its own.
The plugins key must be unencrypted
A channel's client certificate key must be unencrypted; a key with a passphrase is not supported in this release. If deltafi ssl loaded the plugins key with a passphrase, a channel that uses it fails with:
deliver: load outbound client certificate: outbound.auth.clientCert.key /certs/tls.key: encrypted private keys are not supported; load an unencrypted key with deltafi sslIf the ssl-secret is missing, the error names the missing file instead, for example outbound.auth.clientCert.cert /certs/tls.crt does not exist; load a certificate and key with deltafi ssl. At start, Spillway refuses to start. On a reload, the reload is refused and the running configuration is kept. When the file changes under a running channel, the channel keeps its running credentials. A refused reload or rotation counts in spillway_config_reload_failures_total.
Before the First Start
Set instance.id and instance.cluster before Spillway first starts. instance.cluster names every S3 key Spillway writes, so changing it later orphans what is stored under the old value, and a change to instance.id is refused while Spillway runs. The default file uses deltafi-spillway and compose. To start with your own values, create <installDirectory>/config/spillway/spillway.yaml before you enable Spillway; deltafi up keeps a file that exists.
Two Spillway instances that share a bucket must have distinct instance.id and instance.cluster. Every install's default is the same (deltafi-spillway and compose, or spillway and standalone), and Spillway does not detect two instances with one identity, so set your own on each.
The Service
| Item | Value |
|---|---|
| Container | deltafi-spillway, on the deltafi network, Compose profile spillway |
| Inbound | http://deltafi-spillway:8080, reachable only on the deltafi network |
| Admin API | http://deltafi-spillway:8081, reachable only on the deltafi network; see Admin API |
| Mounts | <installDirectory>/config/spillway at /config (read-only; the directory, so renames by editors are seen), the spool directory at /spool, spillway-s3.env at /secrets/spillway-s3.env, and DeltaFi's plugins certificate (the ssl-secret) at /certs |
| Health check | spillway health --config /config/spillway.yaml every 10 s |
| Stop grace period | 60 s: readiness fails for 5 s, then requests and control uploads get up to 30 s. Every 200 is already synced, so a kill past the grace period loses nothing acknowledged |
| Open files | nofile 1,048,576 (see Open-file budget). Container creation fails on a host whose Docker daemon has a lower hard limit, as some rootless or hardened setups do; raise the daemon's limit there |
| Starts after | spillway-s3proxy has started, not that it is healthy: Spillway starts in local-only mode while its object store is down |
| Object store | spillway-s3proxy, profile spillway, at http://spillway-s3proxy:9000 on the deltafi network: S3Proxy's filesystem backend over the s3_dir directory, with the credential from spillway-s3proxy.env. The filesystem backend does not fsync, so objects written just before a power loss can be lost |
Spillway reports ready once its volume lock is held, its configuration is loaded and the object store's first probe has a verdict (at most 10 s). Restart time depends neither on the backlog's size nor on the object store being up.
The health check loads the same configuration file. An invalid edit to spillway.yaml, or a change to admin.listen (which only takes effect at restart), therefore marks the container unhealthy while Spillway keeps running on its old configuration, and a whole-stack deltafi up, which waits for health, fails until the file is fixed.
Adding a Channel
Edit <installDirectory>/config/spillway/spillway.yaml, replace channels: [] with a list of channels and save. Spillway reloads it within a few seconds; there is nothing to restart. Check that it took effect:
docker logs deltafi-spillway 2>&1 | grep -E 'configuration reloaded|configuration reload rejected' | tail -1A minimal channel that sends with DeltaFi's plugins certificate:
channels:
- id: consumer-a
outbound:
url: https://consumer-a.example/ingest
auth:
clientCert: { cert: /certs/tls.crt, key: /certs/tls.key }
ca: /certs/ca.crtEvery setting is in Configuration.
Pointing a Data Sink at Spillway
A DeltaFi data sink sends to a channel at http://deltafi-spillway:8080/c/<channel> with HttpEgress, FlowfileEgress or DeltaFiEgress; Spillway discovers which from each request (see Supported Egress Formats). HttpEgress requires a metadataKey, and it must be the channel's metadataKey (default X-DeltaFi-Metadata); a sink whose key names a different header gets 400 missing did. Its method must be POST or PUT. A DeltaFiEgress sink names no data sink, so it needs a channel of its own, with dataSink set to the sink's name. An HttpEgress sink:
name: consumer-a-sink
type: DATA_SINK
description: Delivers to consumer A through Spillway
subscribe:
- topic: consumer-a
egressAction:
name: SpillwayEgress
type: org.deltafi.core.action.egress.HttpEgress
parameters:
url: http://deltafi-spillway:8080/c/consumer-a
metadataKey: X-DeltaFi-Metadata
method: POSTdeltafi data-sink load consumer-a-sink.yamlSpillway delivers the request's headers to the consumer under the names DeltaFi sent them, apart from the stripped ones (see Security), and adds X-Spillway-Source, X-Spillway-Attempt and X-Spillway-Received. So the consumer finds the metadata under the metadataKey header, and the sink, the channel and the consumer must all use the same name. DeltaFi's egress-sink (http://deltafi-egress-sink-service/, enabled by deltafi.egress_sink.enabled) reads DeltafiMetadata, so a channel delivering to it, and the sink sending to that channel, set metadataKey: DeltafiMetadata. With the default name the egress-sink answers 400: a pass-through returns that 400 to DeltaFi, and a file delivered from the backlog goes to the DLQ.
Then load the sink's resume policies, named after its egress action (SpillwayEgress here), as Resume Policies describes. Without them a 503 from Spillway, or a Spillway restart, leaves the file errored in DeltaFi.
Standalone
A standalone Spillway serves a host apart from DeltaFi, for example next to the consumers on another network. Its stack is the deltafi-spillway/compose/ directory of the DeltaFi repository: a Compose project named spillway with Spillway, its own object store, VictoriaMetrics and Grafana. Every service runs as the user who brings the stack up, who owns its data directories.
| Service | Published port | Role |
|---|---|---|
spillway | SPILLWAY_INBOUND_PORT (8443) for inbound, SPILLWAY_ADMIN_PORT (8444) for the admin API | Spillway in mtls mode |
s3proxy | none | Spillway's object store: S3Proxy's filesystem backend over <data>/s3, which does not fsync (see Choosing an object store) |
victoriametrics | none | Spillway's metrics, kept 90 days. It answers as deltafi-victoriametrics, so the default metrics.pushUrl works unchanged |
grafana | GRAFANA_PORT (3000) | The Spillway dashboard and alert rules, in the Spillway folder |
Settings
The stack's .env holds its settings. A variable set in the environment overrides .env.
| Variable | Default | Description |
|---|---|---|
COMPOSE_PROJECT_NAME | spillway | Compose project name |
SPILLWAY_IMAGE | empty | Spillway's image. make standalone-up sets it to this checkout's version, and the airgap bundle's .env names the bundled image |
GRAFANA_IMAGE, VICTORIAMETRICS_IMAGE | the images DeltaFi runs | Grafana and VictoriaMetrics |
S3PROXY_IMAGE | deltafi/s3proxy:4.1.1-2 | The object store, the image Spillway is tested against |
SPILLWAY_INBOUND_PORT, SPILLWAY_ADMIN_PORT, GRAFANA_PORT | 8443, 8444, 3000 | Host ports |
SPILLWAY_DATA_DIR | ./data | Spillway's spool (spool/); a relative path is under the stack's directory. Put it on its own disk: Spillway's storage limits count the whole filesystem |
SPILLWAY_S3_DIR | ./s3 | The object store's data. It must be on a different filesystem from the spool: demotion moves segments from one to the other, and on one filesystem that frees nothing. setup.sh refuses the two on one filesystem unless storage.local.maxBytes is set in config/spillway.yaml, and then warns |
SPILLWAY_STATE_DIR | ./state | VictoriaMetrics and Grafana state, kept apart from the spool so metrics do not count against its limits |
Certificates to Supply
Put these in the stack's certs/ directory before the first start; bring-up refuses to start, naming each missing file, until all three exist:
| File | Content |
|---|---|
certs/server.crt | Spillway's server certificate, naming the host the senders connect to. The inbound and the admin listener both use it |
certs/server.key | Its private key, unencrypted |
certs/ca.crt | The CA bundle the sending DeltaFi's client certificate chains to. Operator certificates for the admin API chain to it too |
DeltaFi needs no change to send: its egress actions present the certificate deltafi ssl installs. The certificates are read once at startup; replacing them needs a restart (see Credential rotation).
Configuration
The stack's config/spillway.yaml runs inbound.mode: mtls, which applies to the admin listener too. Spillway refuses to start, logging admin.operatorSANs is required when inbound.mode is mtls, until at least one operator SAN is set. Map each sender's certificate SAN to a source name, and list the sources each channel accepts:
inbound:
mode: mtls
tls:
cert: /certs/server.crt # certs/server.crt
key: /certs/server.key
clientCA: /certs/ca.crt # the CA the sending DeltaFi's client certificate chains to
sourceSANs:
deltafi-prod.example: deltafi-prod # client certificate SAN → source name
admin:
operatorSANs: [ops.example] # SANs allowed to use /admin/
channels:
- id: consumer-a
sources: [deltafi-prod]
outbound:
url: https://consumer-a.example/ingestSet instance.id (default spillway) and instance.cluster (default standalone) before the first start, as for Compose inside DeltaFi. A DeltaFi data sink sends to a channel at https://<spillway host>:8443/c/<channel>, with its metadataKey matching the channel's, as in Pointing a Data Sink at Spillway.
Bringing It Up
From a DeltaFi checkout, in deltafi-spillway/:
make docker # builds deltafi/deltafi-spillway:<version>
make standalone-up # renders the alert rules, then runs compose/setup.sh
make standalone-status # the services and their health
make standalone-down # stops the stack and keeps its dataFor a host without network access, make standalone-bundle writes bin/spillway-standalone-<version>.tar.gz. It holds the stack, its configuration and .env as committed (with SPILLWAY_IMAGE naming the bundled image), the rendered alert rules, this page as README.md, and images.tar with all four images. On the target host:
- Extract it.
- Put the three certificates in
certs/. - Set an operator SAN, the senders' SANs and the channels in
config/spillway.yaml. - Run
./setup.sh. Rundocker compose downin the directory to stop the stack.
setup.sh, which make standalone-up runs too, brings the stack up in this order:
- It checks the three certificates before writing anything.
- It generates the secrets once, under
secrets/(mode 0700, each file 0600): one object store credential written as the pairspillway-s3.envands3proxy.env, generated when both are absent, and Grafana's admin password,grafana-admin.spillway-s3.envis never overwritten. A missingspillway-s3.envis written again froms3proxy.env; a missings3proxy.envis written again fromspillway-s3.envwhilecompose.yamlstill has thes3proxyservice, and is left absent once it does not. - It creates the data directories as the invoking user, and exits 1 when the spool and the object store are on the same filesystem unless
storage.local.maxBytesis set inconfig/spillway.yaml, in which case it warns and continues. It makes this check before creating the directories. - In a bundle, it loads
images.tarwhen any of the four images is missing. - It restarts any container an earlier run left crash-looping, so a corrected configuration is read at once.
- It runs
docker compose up --detachand waits up to 180 s for every service but s3proxy to be healthy. On failure it prints the services' state and the last 20 log lines of each that is not running or is unhealthy. It then gives s3proxy 30 s to become healthy; if it does not,setup.shprints a warning that Spillway runs local-only until the object store answers, and still exits 0.
Running it again keeps the secrets and the data. Always start the stack with setup.sh or make standalone-up: they run the services as the invoking user. A hand-run docker compose up falls back to user 1000:1000, which cannot write data directories created by another user.
Grafana
Grafana is at http://<spillway host>:3000; log in as admin with the password in secrets/grafana-admin. Grafana reads that file only when it first creates its database under <data>/grafana, so rewriting the file afterwards changes nothing: change the password in Grafana itself.
The dashboard and the alert rules are in the Spillway folder. The rules are the ones DeltaFi ships, rendered by make standalone-rules (which standalone-up and standalone-bundle run) so that each runbook_url opens the public docs, https://docs.deltafi.org/spillway/sops.html#<section>, instead of DeltaFi's embedded docs. The render fails, writing nothing, if any link is left pointing elsewhere. The rendered copy, grafana/alerting/spillway.yaml, is overwritten on every bring-up: change the rules in DeltaFi's orchestration/charts/deltafi/files/grafana/alerting/spillway.yaml.
AWS S3 Instead of s3proxy
AWS S3 can replace s3proxy: set storage.s3.endpoint to the regional endpoint, such as https://s3.us-east-1.amazonaws.com (Spillway addresses the bucket path-style), set storage.s3.region and storage.s3.bucket, and give Spillway a credential scoped to that bucket in secrets/spillway-s3.env. In the standalone stack, also remove the s3proxy service from compose.yaml and spillway's dependency on it. setup.sh never overwrites spillway-s3.env, and with the s3proxy service gone it does not write s3proxy.env, which can be deleted. Inside DeltaFi, deltafi up keeps spillway-s3.env too, but the spillway-s3proxy service always runs there: when spillway-s3proxy.env is missing, it is written again from spillway-s3.env. Inside DeltaFi the idle spillway-s3proxy service still holds a copy of that credential in spillway-s3proxy.env; scope the credential to the Spillway bucket.
Bounded test layouts
For a test layout where Spillway must share a filesystem with other data, set storage.local.maxBytes in spillway.yaml to the byte budget Spillway may use:
storage:
local:
maxBytes: 10GiBWith it set, the limits count Spillway's own bytes against maxBytes in place of the whole filesystem: softLimitPct, hysteresisPct and hardLimitPct are fractions of maxBytes, and inode use is ignored. Spillway's own bytes are the allocated blocks under storage.local.path, measured by a background walk every 10 seconds, plus the bytes Spillway has written since the walk began. Files Spillway deletes leave the count at once; a walk that was running at the time may still hold their bytes until the next walk, so the count runs high between walks, apart from small bookkeeping files such as the audit journal, which a walk picks up.
A reservation is also refused with 503 hard limit when the whole filesystem, counting reservations for files being received, would pass hardLimitPct of its own capacity, so a bounded Spillway cannot fill a disk that DeltaFi shares. Spillway logs a warning at startup when maxBytes is larger than the filesystem, since that guard then applies first. A change to maxBytes takes effect at the next restart. While DeltaFi holds the shared filesystem above hardLimitPct, promotion fails the filesystem guard and backs off, logging each failure; nothing is lost. Production layouts should still give the spool a disk of its own and leave maxBytes unset.
deltafi up and the standalone setup.sh check the layout before starting Spillway:
- The spool and the object store on one filesystem, with
maxBytesunset or0: refused.deltafi upfails with an error namingdeltafi.spillway.spool_dir,s3_dirand thespillway.yamlto edit;setup.shexits 1 with the same message, before it creates the directories. Only an uncommentedmaxBytes:line counts forsetup.sh, and only in the committed block layout ofspillway.yaml, with two-space indentation per level; written any other way, it is not found andsetup.shrefuses the shared layout. - The same layout with
maxBytesset: a warning thatmaxBytesbounds Spillway to the value as written, and the stack starts. - In DeltaFi, the spool on the filesystem of DeltaFi's data directory: a warning that a full spool pushes DeltaFi toward its disk-space limits. The default
spool_diris under the data directory, so the default layout gets this warning.
For example, a Compose test host with one disk, where deltafi up and its default directories would otherwise be refused, sets this in <installDirectory>/config/spillway/spillway.yaml before the next deltafi up:
storage:
local:
maxBytes: 20GiBDurability Profiles
Spillway behaves the same on every profile; the profile decides what a 200 survives (assumption A2).
| Profile | Local tier | Object store | A 200'd file survives |
|---|---|---|---|
| Simple Compose | Local SSD or NVMe with power-loss protection | Spillway's s3proxy on a separate disk | Process crash, and power loss of the Spillway host for files still on local disk. With s3proxy on the same host (the shipped layout), power loss can lose recently demoted files (see Choosing an object store). Not disk loss |
| Rigorous Compose | Mirrored disks (RAID1, ZFS mirror) or a network block volume | s3proxy on replicated storage, or Ceph RGW | Also single-disk loss; also host loss with a network volume |
| Kubernetes, cloud (V1) | EBS gp3 or equivalent through a CSI volume | AWS S3 | Also node loss; the volume reattaches in its zone |
| Kubernetes, on-prem (V1) | Replicated CSI volume (Ceph RBD, Longhorn, vSphere) or local NVMe | s3proxy or Ceph RGW | Per the CSI replication; local NVMe as Simple Compose. With s3proxy, the s3proxy limit below applies |
Local NVMe is supported at the site's own risk of data loss (instance-store NVMe is lost when the instance stops or its host fails) and is not covered by Gate 1, which measures gp3 only.
Spool filesystem. Use XFS, or ext4 formatted with -i 4096. Default ext4 (one inode per 16 KiB) still works, because inode use counts as local usage, but with small files it demotes much earlier. At startup Spillway warns the local volume has fewer inodes than its capacity ÷ 8 KiB; small files will demote early; XFS or ext4 formatted with -i 4096 is recommended when the volume has fewer inodes than that.
Spillway also warns at startup and on reload, maxFileSize is a large share of the volume; a segment holding such a file promotes only while usage is below soft − hysteresis and it lands below soft, or, if it is at least soft, while it lands below the hard limit within the channel's fair share; the margin override lifts all but the hard limit, for a channel whose maxFileSize is at least soft − hysteresis of the volume.
Choosing an Object Store
- Supported and tested: s3proxy with its filesystem backend, and AWS S3. MinIO and Ceph RGW are best-effort: they must pass the startup probe, and a store that answers the probe wrongly (accepts a bad checksum, mis-orders a listing, ignores ranges) makes Spillway fail closed at startup.
- Give Spillway its own store on its own disk. Never point it at DeltaFi's content store (
deltafi-s3proxy): overflow there would trigger DeltaFi's disk-space delete and ingress shutoff. - The s3proxy power-loss limit. S3Proxy's filesystem backend does not fsync (no version does). If the host running Spillway's s3proxy loses power, data Spillway recently demoted to it, still in that host's page cache, can be lost. Spillway has already deleted its local copy, so those files are gone without an audit record of the loss. Sites that need demoted data to survive power loss use AWS S3 or another resilient store.
Security
- Inbound inside DeltaFi. The inbound listener is plain HTTP with no authentication. Anything on the
deltafinetwork that can reachdeltafi-spillwaycan hand it files, which Spillway forwards with its consumer credentials. That is the same exposuredeltafi-egress-sinkand DeltaFi's other internal services have. - Admin API inside DeltaFi. In
internalmode the admin API has no authentication either: anything on thedeltafinetwork can pause a channel or purge its DLQ. Every mutation is logged and audited with the caller's address. - Standalone. Inbound and admin require mTLS; see Standalone.
- Secrets.
Authorization,Cookie,Proxy-Authorizationand each channel'sstripHeadersare stripped at ingest and never stored. Consumer credentials come from per-channel files. - Object store access. One credential scoped to Spillway's bucket, held only by Spillway. On AWS, use SSE-S3, or SSE-KMS with bucket keys.
- At rest. Encrypt the local volume (LUKS, or EBS encryption) and the object store's backend.
Sizing
Single-Instance Target
This release runs one Spillway instance. Its acceptance target is Gate 1's G3 row: about 965 files/s normal and 4,847 files/s in a 600 s burst, on one c8gn.4xlarge with one 369 GB gp3 volume provisioned at 25,000 IOPS and 1,160 MiB/s. At a 200 KB mean file, 965 files/s is 965 × 200 KB = 193 MB/s, and 193 MB/s × 86,400 s is about 16.7 TB/day. A site above that needs V1's multi-node deployment (see What Is in This Release) or a sizing run of its own on its host (see Qualifying a Spillway Host).
Demoting at burst rate is not possible on this instance: its EBS limit is 1,250 MB/s, and within the 80% margin the burst's 969.4 MB/s of writes leave demotion about 30.6 MB/s (see the worked example's local volume throughput row). So a burst during a consumer outage, when the whole burst spills, grows local usage by about (969.4 − 30.6) MB/s × 600 s = 938.8 MB/s × 600 s = 563.3 GB. On G3's own 369 GB volume that passes the hard limit, 0.80 × 369 GB = 295.2 GB. Once a consumer outage has filled the volume to soft (0.50 × 369 GB = 184.5 GB, which 193 MB/s fills in 956 s, about 16 minutes), demotion holds usage between soft − hysteresis (0.45 × 369 GB = 166.1 GB) and soft, so a burst then reaches the hard limit within (295.2 − 166.1) GB ÷ 938.8 MB/s = 138 s, about 2.3 minutes; even from empty it takes only about 5 minutes (184.5 GB ÷ 969.4 MB/s + 110.7 GB ÷ 938.8 MB/s = 190 s + 118 s = 308 s). From then on DeltaFi is answered 503 hard limit and retries, until demotion, and the consumer once it is back, make room. Riding out the whole burst on local disk needs a volume sized like the worked example's 9,264 GB, whose 2,779.2 GB between the soft and hard limits holds the 563.3 GB, and demotes it afterwards. With the consumer up, G3's volume does hold a burst: 2λ passes through, the 2,917 files/s × 200 KB = 583.4 MB/s that spills leaves demotion about 1,000 − 583.4 = 416.6 MB/s, and the net (583.4 − 416.6) MB/s × 600 s = 100.1 GB stays under the 129.1 GB from soft − hysteresis to the hard limit.
DeltaFi Thread Coupling
HttpEgress holds its action thread until Spillway answers. Threads are configured per action class, not per sink: DeltaFi runs 4 HttpEgress threads per core-actions replica by default, shared by every sink of that class. So DeltaFi's send rate is closed-loop:
λ_max = actionThreads × core-actions replicas ÷ R
where R is Spillway's response time, so DeltaFi holds an egress thread for R per file. For a spilled file R is about R_commit, a local commit of about a millisecond. For a passed-through file R is about the consumer's response time W, and W is at most passThrough.maxTime (50 ms), since a slower consumer is not passed through but buffered. Fast consumers are therefore the ones that need egress threads: their files pass through and hold a thread for up to 50 ms each, where a slow consumer's files spill and hold one for about a millisecond. FlowfileEgress also packages on a single thread per replica, a DeltaFi-side ceiling on FlowFile throughput.
Sizing Rules
| Quantity | Rule |
|---|---|
Connections maxConnections | ≥ μ_target × W ÷ 0.7, where μ_target is the drain rate (files/s) the catch-up goal needs and W the mean delivery time. The default 8 suits only small sites: at W = 20 ms it supports about 280 files/s |
| DeltaFi egress threads | actionThreads × replicas ≥ λ_pass × W + λ_spill × R_commit, plus headroom, where λ_pass and λ_spill are the peak files/s passed through and spilled; at most λ_peak × max(R_commit, W). Headroom is the site's call. Threads are shared by every sink of the action class. HttpEgress defaults to 4 per core-actions replica; set it with deltafi action concurrency set org.deltafi.core.action.egress.HttpEgress <n>, at most actions.maxConcurrency (default 64); see Configuring Concurrency at Runtime |
| Soft limit | ≥ (λ − μ_slow) × T_slow for the longest slow episode served without S3 |
| Hard − soft gap | ≥ λ × T_S3outage, the S3 outage to ride through while the consumer is also down |
| Demotion bandwidth δₘ | ≥ λ_peak, so a long outage is limited only by retention; one host may fall short during a burst, and then its local volume must hold the burst (see the worked example's local volume throughput row and Single-Instance Target) |
Promotion pool transferParallelism | ≥ ⌈(μ − λ) per instance ÷ one promote stream's measured rate⌉ + 1 for each channel recovering at once, so promotion can run the streams its channels need and demotion keeps a slot; see Promotion Throughput |
| Channels sharing a volume | Each gets an equal share automatically; see Channels Sharing a Volume |
| S3 capacity | ≥ λ × longest outage, at most λ × retentionHours |
| Local volume throughput | ≥ max(λ + δₘ during an outage, 2μ during recovery) |
| Local volume IOPS | Planning estimate 4 × (files in + files out) per second |
| Local volume inodes | ≥ files held at the soft limit (one per entry), with margin; XFS or ext4 -i 4096 |
Channel maxStreams | ≥ the sink's DeltaFi egress threads sending to the channel, across replicas, divided by Spillway instances |
| Open files | RLIMIT_NOFILE ≥ the open-file budget |
At high rates a single gp3 volume may not carry the spill IOPS and throughput, and the instance's own EBS limit caps the total. Size the volume from the Gate 1 spill figures rather than the planning estimate, and where one volume falls short, stripe several gp3 volumes into one spool filesystem (Gate 1's fallback for its G3 host if one volume measures short).
Catch-up after an outage of length T at a constant inflow is T × ρ ÷ (1 − ρ), where ρ is inflow ÷ consumer capacity: at ρ = 0.625, each hour of outage costs 1.67 hours of catch-up. Check retention conservatively with T_outage × (1 + ρ ÷ (1 − ρ)) ≤ retentionHours.
Promotion Throughput
Spillway brings a channel's S3 backlog back to the local volume on several promote streams at once, each fetching one segment and holding one slot of the upload pool, storage.s3.transferParallelism. It measures what one stream carries (spillway_promote_stream_bytes_per_second) and gives a channel ⌈target ÷ that rate⌉ streams, where the target is the channel's μ − λ (consumer capacity less inflow) once its projections are known, and otherwise its delivery rate. A channel's streams stop one slot short of the pool, so demotion always keeps a slot. While usage is at or above the soft limit, the streams beyond each channel's first also leave demotion the slots it needs to carry the net local inflow: ⌈net inflow ÷ what one upload slot carries (spillway_upload_slot_bytes_per_second)⌉, at least 1.
So transferParallelism must cover the streams the channels recovering at once need, plus one: at least ⌈(μ − λ) ÷ stream rate⌉ + 1 for a single channel. A pool too small leaves the consumer short of work after a long outage, catch-up takes longer, and files can age off before delivery. Per instance, at the cost model's consumer capacity μ = 2λ (so μ − λ = λ), a channel needs:
| Instance (per day) | μ − λ | Streams at 50 / 100 / 172 / 200 MB/s a stream | transferParallelism needed at 50 / 100 / 172 / 200 MB/s a stream |
|---|---|---|---|
| 1 TB | 1 TB ÷ 86,400 s ≈ 11.6 MB/s | 1 / 1 / 1 / 1 | 8 (the default) at every rate, from the fluid simulation's 10 TB/day site, whose nodes each run 11.6 MB/s on a 100 GB volume |
| 10 TB | 10 TB ÷ 86,400 s ≈ 116 MB/s | 3 / 2 / 1 / 1 | 4 / 3 / 2 / 2, rule-derived (no simulated node runs at this rate); the default 8 covers it |
| G3, about 16.7 TB | 965 files/s × 200 KB = 193 MB/s | 4 / 2 / 2 / 1 | 8 (the default) at every rate, from the fluid simulation's 100 TB/day site, whose nodes each run 192.9 MB/s on a 369 GB volume |
172 MB/s is one stream's rate in the promote bench's smoke run (macOS, an object store on the same host); measure your own with make bench-promote (see Qualifying a Spillway Host). The simulation tried pools of 8, 10, 12, 16, 20, 24, 32, 48, 64, 96 and 128, so its figures round up to the next of those. Each simulated figure is the smallest pool at which every one of that site's bursts and outages, 10 minutes to 7 days, kept the consumer fed and aged nothing off; a rule-derived figure is the rule above, not simulated. A site that needs more than one instance waits for V1's multi-node deployment (see Single-Instance Target).
A channel's streams run back to back: each starts its next segment as soon as the last one lands, without waiting for the files it promoted to be delivered. Delivery stays oldest first. The files a channel promoted do not hold its next segment back, but any other local file received no later than that segment does, so the newest minutes demoted at the soft limit are not promoted back while older files are queued. Promotion runs ahead of delivery by at most 30 s of the channel's target or delivery rate, and at least one segment. Check a site's end-to-end drain against its μ − λ with the bench's drainBytesPerSecond.
Worked Example: One Host
The Single-Instance Target host, run through each Sizing Rules row. It serves one channel from one core-actions replica, at λ = 965 files/s × 200 KB = 193 MB/s and a burst of λ_peak = 4,847 files/s × 200 KB = 969.4 MB/s (Gate 1's G3 row and 200 KB mean). Its volume is the 9,264 GB the hard − soft gap row needs for a 4 h S3 outage, provisioned like G3's at 25,000 IOPS and 1,160 MiB/s, which gp3 allows at any size; G3's own 369 GB volume is the 9.6-minute case in that row. Each row names the volume it uses.
| Quantity | Working | Setting |
|---|---|---|
Connections maxConnections | μ_target = μ = 2λ = 2 × 965 = 1,930 files/s, assuming Gate 1's consumer drain μ = 2λ; W = 20 ms, an assumed consumer mean delivery time: 1,930 × 0.020 ÷ 0.7 = 55.1 | maxConnections: 56 |
| DeltaFi egress threads | λ_pass × W + λ_spill × R_commit. W = 20 ms is under passThrough.maxTime (50 ms), so the consumer's files pass through; R_commit ≈ 1 ms (above). In the burst, λ_pass = 2λ = 1,930 files/s pass through (Gate 1's site inputs) and λ_spill = 4,847 − 1,930 = 2,917 spill: 1,930 × 0.020 + 2,917 × 0.001 = 38.6 + 2.9 = 41.5. At the default 4 threads, pass-through alone sends at most 4 ÷ 0.020 = 200 files/s | deltafi action concurrency set org.deltafi.core.action.egress.HttpEgress 42, within the clamp of 64, before headroom |
Channel maxStreams | 42 threads × 1 replica ÷ 1 instance = 42, above the default 32 | maxStreams: 42 |
| Hard − soft gap | λ × T_S3outage, with an assumed 4 h (14,400 s) S3 outage while the consumer is down: 193 MB/s × 14,400 s = 2,779.2 GB. At the default limits the gap is 80% − 50% = 30% of the volume, so the volume is at least 2,779.2 GB ÷ 0.30 = 9,264 GB. The G3 row's 369 GB volume has a 0.30 × 369 = 110.7 GB gap, which rides through 110.7 GB ÷ 193 MB/s = 574 s, about 9.6 min | The 9,264 GB volume, softLimitPct: 50, hardLimitPct: 80 (the defaults) |
| Soft limit | On the 9,264 GB volume the soft limit holds 0.50 × 9,264 GB = 4,632 GB; with the consumer down (μ_slow = 0) that serves (λ − 0) × T_slow = 4,632 GB, so T_slow = 4,632 GB ÷ 193 MB/s = 24,000 s, about 6.7 h without S3 | softLimitPct: 50 (the default) |
| Demotion bandwidth δₘ | ≥ λ_peak = 969.4 MB/s; over the default 8 upload slots, each slot carries at least 969.4 ÷ 8 = 121.2 MB/s (spillway_upload_slot_bytes_per_second). This instance's EBS limit keeps demotion well below that during a burst; see the local volume throughput row | Measure the slot rate against the site's object store |
Promotion pool transferParallelism | ⌈(μ − λ) ÷ stream rate⌉ + 1, with μ − λ = 193 MB/s and the smoke run's 172 MB/s a stream: ⌈1.12⌉ + 1 = 3; the fluid simulation held at the default 8 at every stream rate (Promotion Throughput) | transferParallelism: 8 (the default) |
| S3 capacity | λ × the longest consumer outage: 193 MB/s × 3,600 s = 694.8 GB for each hour; at most λ × retentionHours = 193 MB/s × 336 h × 3,600 s = 233.5 TB at the default 336 h | 694.8 GB an outage hour, up to 233.5 TB |
| Local volume throughput | max(λ + δₘ, 2μ), with the inflow taken at λ_peak like the IOPS row: a burst during a consumer outage writes 969.4 MB/s while demotion reads δₘ = 969.4 MB/s, so max(969.4 + 969.4, 2 × 386) = max(1,938.8, 772) = 1,938.8 MB/s. With the 80% margin that is 1,938.8 ÷ 0.8 = 2,423.5 MB/s. That is more than the 9,264 GB volume's 1,160 MiB/s (1,160 × 1.048576 = 1,216.3 MB/s), more than one gp3 volume's 2,000 MiB/s maximum (2,097.2 MB/s), and more than the c8gn.4xlarge's own 1,250 MB/s EBS limit, whose 80% is 1,000 MB/s. The burst's writes alone fit within that margin (969.4 of 1,000 MB/s). Recovery fits: 772 ÷ 0.8 = 965 MB/s | 1,160 MiB/s provisioned. On this host δₘ falls short of λ_peak: during a burst, demotion gets only about 1,000 − 969.4 = 30.6 MB/s within the margin, and at the normal rate about 1,000 − 193 = 807 MB/s. The 9,264 GB volume absorbs a 600 s burst during a consumer outage, about 563.3 GB, within its 2,779.2 GB between the soft and hard limits, and demotion catches up after it; G3's own 369 GB volume reaches its hard limit first (see Single-Instance Target). The instance's limit binds, so more provisioned throughput or striped volumes on this instance do not help. A site that needs δₘ = λ_peak during a burst needs an instance with a higher EBS limit, striped volumes up to that limit (see the gp3 paragraph above), or V1's multi-node deployment |
| Local volume IOPS | On the 9,264 GB volume (the same as G3's provisioning): 4 × (files in + files out). A burst during a consumer outage: 4 × (4,847 + 0) = 19,388. Recovery: 4 × (965 + 1,930) = 11,580. Kept at 80% of what is provisioned: 19,388 ÷ 0.8 = 24,235 | 25,000 IOPS provisioned |
| Local volume inodes | On the 9,264 GB volume, files held at the soft limit: 4,632 GB ÷ 200 KB = 23.16 million (at the hard limit, 0.80 × 9,264 GB ÷ 200 KB = 37.06 million). ext4 -i 4096 on 9,264 GB gives 9,264 GB ÷ 4,096 B = 2.26 billion | XFS, or ext4 -i 4096 |
| Open files | 5 × Σ maxStreams + Σ (4 × maxConnections + 2) + 1,024 × transferParallelism + 268 = 5 × 42 + (4 × 56 + 2) + 1,024 × 8 + 268 = 210 + 226 + 8,192 + 268 = 8,896 | RLIMIT_NOFILE ≥ 8,896; the Compose service sets 1,048,576 |
| Channels sharing a volume | One channel | Nothing to set |
With μ = 2λ, ρ = 0.5, so each hour of consumer outage costs 0.5 ÷ (1 − 0.5) = 1 hour of catch-up, and the retention check T_outage × (1 + 1) ≤ 336 h allows a consumer outage of up to 168 h, 7 days.
Qualifying a Spillway Host
The deltafi-spillway Makefile has benches and a power-loss suite for checking a host and its disk before Spillway carries traffic.
- Benches need a disk of their own.
make bench-passthrough,make bench-spill,make bench-restartandmake bench-promoterun the release binary on the directoryBENCH_VOLUME, which must be on the disk under test; a tmpfs, ramfs or overlay is refused, and a macOS RAM disk cannot be detected, so do not use one. Since Spillway's limits count the whole filesystem,make bench-restart, which fills the volume tohardLimitPct(80%), would fill a shared disk to 80%: give it a dedicated disk, a loop device or a small disk image. - Promote throughput.
make bench-promote(needs Docker) fills an object store it runs on the same host, then drains it into Spillway with 1, 2, 4 and 8 promote streams. Per step it reportsbytesPerSecondPerStream, what one stream carries, anddrainBytesPerSecond, the backlog's end-to-end drain including the waits for delivery. It needs (BENCH_SEGMENTS, default 32, + 8) × 64 MiB of room under 85% ofBENCH_VOLUME. Its store is not AWS S3, so a site promoting from AWS S3 still needs a measurement against that store. - Keep a spill run below the soft limit. Above
softLimitPctSpillway starts demoting, and demotion's reads compete with the commits the spill bench measures. To measure commits alone, sizeBENCH_VOLUMEso amake bench-spillrun stays belowsoftLimitPct, or record usage at each step and read the steps above it as spilling and demotion together. - What the power-loss suite proves.
make powerloss-testcuts power under Spillway on LazyFS at every crash failpoint and at random points under load, and checks that no acknowledged file is lost. LazyFS loses unsynced file data only; it makes creates, renames and unlinks durable at once. So it proves Spillway's file and audit syncs but not its directory fsyncs, which are left to the hard-reset and dm-flakey drills on a real VM. - The simulator's consumer (
spillway-sim consumer), used for staging runs, reads the metadata fromX-DeltaFi-Metadata, the channel default.

