Skip to content

Spillway Resume Policies ​

Experimental Alpha

Spillway is an experimental alpha. Its configuration, behavior and storage formats may change in future releases.

Why They Are Needed ​

Spillway answers 503 when it cannot take a file now: the local volume is at its hard limit, a channel is past its fair share near it, a stream cap is reached, the volume is degraded, and so on. While Spillway restarts, DeltaFi cannot connect at all. DeltaFi turns both into egress errors and does not retry inside the action, so without help those files would stay errored in DeltaFi.

DeltaFi's automatic resume fixes this: a resume policy matching those errors resends each file after a delay, so a 503 or a restart becomes a DeltaFi retry instead of a permanent error (assumption A4). Resume policies match on the egress action's name, so each Spillway-backed data sink needs its own policies.

DeltaFi records the errors as:

Error causeWhen
Unsuccessful HTTP <METHOD>: 503Spillway answered 503
Service <METHOD> failureDeltaFi could not reach Spillway, for example during a restart, or the connection dropped

Each sink gets one pair of policies for each HTTP method its egress action uses, scoped by action to that egress action. No 4xx matches either policy, so files Spillway refuses for good (an unknown channel, a missing DID, a file too large) stay errored for an operator to look at.

The Rendered Policies ​

spillway resume-policies prints the policies for one egress action as a JSON array for deltafi auto-resume load. For an egress action named SpillwayEgress that sends with POST:

json
[
  {
    "name": "spillway-SpillwayEgress-POST-503",
    "errorSubstring": "Unsuccessful HTTP POST: 503",
    "action": "SpillwayEgress",
    "maxAttempts": 1000,
    "backOff": {
      "delay": 30,
      "multiplier": 1,
      "maxDelay": 300
    }
  },
  {
    "name": "spillway-SpillwayEgress-POST-connection",
    "errorSubstring": "Service POST failure",
    "action": "SpillwayEgress",
    "maxAttempts": 1000,
    "backOff": {
      "delay": 30,
      "multiplier": 1,
      "maxDelay": 300
    }
  }
]
FieldValueEffect
namespillway-<action>-<METHOD>-503, spillway-<action>-<METHOD>-connectionOne pair per method
maxAttempts1000About 3.4 days of retries
backOff.delay, multiplier, maxDelay30 s, 1, 300 sDeltaFi waits attempt × 30 s before each resume: 30 s, 60 s, … and every 300 s from the tenth attempt
prioritynot setDeltaFi computes it: 200, since each policy has an action and an error substring of more than 10 characters

Loading the Policies ​

Run these once for each Spillway-backed data sink, using the name of the sink's egress action (egressAction.name in the data sink, SpillwayEgress in the example on Deployment). Inside DeltaFi's Compose stack the spillway command runs in the deltafi-spillway container.

  1. Render the policies for every method the egress action uses:

    bash
    docker exec deltafi-spillway /app/spillway resume-policies --action SpillwayEgress --method POST > spillway-SpillwayEgress.json

    Repeat --method for an action that uses both POST and PUT. With no --method, POST is rendered.

  2. Dry-run each policy. deltafi auto-resume dry-run reads one policy, so render each one with --name and test it:

    bash
    docker exec deltafi-spillway /app/spillway resume-policies --action SpillwayEgress --name spillway-SpillwayEgress-POST-503 > p.json
    deltafi auto-resume dry-run p.json
    docker exec deltafi-spillway /app/spillway resume-policies --action SpillwayEgress --name spillway-SpillwayEgress-POST-connection > p.json
    deltafi auto-resume dry-run p.json

    The dry run reports how many errored DeltaFiles the policy would match.

  3. Load them:

    bash
    deltafi auto-resume load spillway-SpillwayEgress.json

    Policies only apply to errors from then on. To resume files that errored before they were loaded, run deltafi auto-resume apply spillway-SpillwayEgress-POST-503 spillway-SpillwayEgress-POST-connection.

spillway resume-policies exits 2, printing why and nothing else, when:

  • --action is missing, blank, or starts or ends with whitespace (a blank action would match every action, and a padded one none);
  • a --method is not POST or PUT, or is given twice;
  • --name names no rendered policy; the message lists the valid names.

What a 503 Body Means ​

Spillway's 503 body is spillway: <reason>, text for operators, such as spillway: hard limit. DeltaFi shows it as the error's context. Spillway sends no Retry-After; the resume policy's backoff decides when DeltaFi tries again. Each body has a matching reason label of spillway_rejected_total, written in snake_case (hard_limit for spillway: hard limit); Monitoring lists both and what each one means.

Contact US