Running ingestor runtimes
The ingestor runtime is the component that reads ingestion sources (SFTP servers, S3 buckets, SQS queues, RabbitMQ, databases, HTTP APIs, HTTP pushes and kinds added by extensions) and turns what it reads into dispatch jobs or events on the platform. It also hosts functions written in Java. It is a separate Java 25 service with its own image, and it is optional: a platform without a runtime simply runs no ingestions.
The runtime talks to the platform only through the platform’s runtime API, as a service account. The platform stores the definitions, leases, watermarks and reports; the runtime holds nothing that has to survive it. See ingestor runtime for how it works inside, and ingestion for the model.
Before the first runtime
Section titled “Before the first runtime”On the platform:
- Set
FC_INGESTION_ENABLED=trueon the API tier. Off (the default), the ingestion and runtime APIs answer404. - Create a service account at anchor tier that belongs to no application and no client, and
give it the role
platform:ingestion-runtime. Any other kind of principal is refused on every runtime call, even with the role (INGESTION_RUNTIME_SERVICE_ACCOUNT_REQUIRED,INGESTION_RUNTIME_ANCHOR_REQUIRED,INGESTION_RUNTIME_APPLICATION_BOUND). The role reaches every client’s and application’s ingestions, so one fleet serves them all. - If the runtime will host Java functions, also give the account
platform:function-runner, and set the platform’s runner URL for thejvmruntime (see function runners).
A runtime id belongs to one service account. The first poll that names a runtime id registers it to the
calling service account. Every runtime route refuses a call that names that id from another account with
403 RUNTIME_ID_NOT_OWNED, and the refusal is audited. So a fleet should use one service account, and two
fleets with different accounts must not share ids. The default id comes from the hostname, so give each
fleet distinct ids if hostnames can repeat. A binding ends only when the platform’s retention removes a
runtime that has not been seen for 7 days, after which the id can be registered again by another account. If
you move a fleet to a new service account, change its runtime ids, or wait out that week.
Platform settings that shape the fleet:
| Variable | Default | Effect |
|---|---|---|
FC_INGESTION_LEASE_SECONDS |
180 | How long a polled ingestion’s lease lasts without renewal. It is also the liveness window: a runtime that polled within one lease is live. Below 120 the server refuses to start |
FC_INGESTION_UNHEALTHY_COOLDOWN |
10m |
For this long after a runtime reports an ingestion FAILED or FAILING, the ingestion moves to another live runtime that carries its kind and has not failed it |
FC_INGESTION_RECENT_WINDOW |
10m |
A runtime returning after a gap claims at most its fair share of new leases in one poll, so the first runtime back after an outage does not take everything |
FC_INGESTION_JOBS_MAX_BYTES, FC_INGESTION_REPORT_MAX_BYTES |
10 MiB, 4 MiB | Request size limits for the jobs and report calls |
Configuration
Section titled “Configuration”The runtime reads config/application.yaml from its working directory (the image has it) and every
key can be overridden by an environment variable named after its path. The ones you set:
| Variable | Default | Notes |
|---|---|---|
FLOWCATALYST_BASE_URL |
http://localhost:8080 |
The platform. Must be https unless APP_ENV is local or test |
FLOWCATALYST_CLIENT_ID, FLOWCATALYST_CLIENT_SECRET |
The service account’s credentials. Required | |
INGEST_RUNTIME_ID |
runtime-<hostname> |
Unique per running process. A second live process with the same id is refused (409 RUNTIME_ID_IN_USE). The id also belongs to the service account that first registered it: see below |
INGEST_POLL_INTERVAL |
PT1M |
How often the runtime polls and reports |
INGEST_INGESTION_ENABLED, INGEST_FUNCTIONS_ENABLED |
true, true |
The two roles; see below |
INGEST_FUNCTIONS_POOL |
default |
The function pool this process serves |
INGEST_EXTENSIONS_DIR, INGEST_EXTENSIONS_MANIFEST |
image: /opt/ingestor/extensions; unset |
Extension jars; see below |
INGEST_CAMEL_ROUTES_ENABLED |
false |
Run the camel-route kind (routes run with the runtime’s own network and identity; only anchor users can write them) |
INGEST_SECRETS_CACHE_TTL |
PT1M |
How long a fetched secret is kept and how often running routes re-read theirs |
INGEST_ADVERTISED_URL |
unset | Shown on the platform for information |
FLOWCATALYST_TIMEOUT |
PT30S |
Longest wait for a platform call (polls and reports wait at most a sixth of the lease) |
INGEST_AWS_ENDPOINT |
unset | A stand-in for AWS (for example an S3-compatible store) for the s3 and sqs kinds |
HTTP_PORT, HTTP_HOST |
8091, 0.0.0.0 |
HTTP ingestions, JVM functions and health |
APP_ENV |
image: production |
production refuses a plain-http platform and loopback sources |
The s3 and sqs source kinds use the standard AWS credential chain of the runtime’s environment.
Sizing a fleet
Section titled “Sizing a fleet”- Polled sources (
sftp,s3,database-poll,api-poll, extension kinds,camel-route) run on one runtime at a time, under a lease. The platform spreads them evenly over the live runtimes that carry each kind. - Push sources (
http,sqs,rabbitmq) run on every runtime that carries them; put a load balancer in front of the runtimes for HTTP ingestions. - Run at least two so that a crash or a deploy moves polled ingestions instead of stopping them. Add more when polled sources are slow (each poll occupies its route) or when push traffic needs the capacity.
- Memory. The JVM may use 75 % of the container’s memory. Ingestions that read large files or host many functions need more.
Leases and failover
Section titled “Leases and failover”A polled ingestion is held under a lease (3 minutes by default) that each poll renews (every minute). The runtime protects the lease from its own side: a watchdog stops a route about a minute before its lease would end without a renewal, so a runtime that cannot reach the platform never keeps running an ingestion another runtime may already have taken.
| Event | What happens | Gap in that ingestion |
|---|---|---|
| A runtime shuts down cleanly | It stops its routes, gives back the leases of those that stopped cleanly, and says goodbye. Others take them at their next poll | About one poll interval |
| A runtime is killed | No goodbye; its leases run out, then the others take them at their next poll | Up to the lease plus a poll interval |
| The platform is unreachable for a while | Runtimes keep push routes running but cannot make jobs; they hold polled routes until their leases are about to end, then stop them | Until the platform is back |
| Every runtime is down | After a lease and two minutes, the platform counts each polled ingestion in fc_ingestion_unheld and shows it as “not running” |
Until a runtime returns |
Nothing is lost or read twice beyond what idempotency absorbs: watermarks and cursors live on the
platform and move to the new runtime with the lease, and each record carries an idempotency key the
platform remembers for 7 days. A repeatable fleet test exercises all four cases (make ingestor-fleet-test), asserting that every record becomes exactly one job.
Rolling restarts
Section titled “Rolling restarts”Restart one runtime at a time and wait for it to be ready before the next:
- Send
SIGTERM. The runtime stops taking from its sources, lets exchanges in flight finish (up to about 12 seconds), gives back its leases and says goodbye. A whole shutdown takes about 20 seconds; one held up by a stuck route can take about 50. - Give the container a stop timeout of at least 60 seconds before it is killed.
- Wait for
GET /health/readybefore restarting the next one.
Functions-only and ingestion-only processes
Section titled “Functions-only and ingestion-only processes”One process can do both jobs, or you can separate them:
| Process | Settings |
|---|---|
| Both (default) | INGEST_INGESTION_ENABLED=true, INGEST_FUNCTIONS_ENABLED=true |
| Functions only | INGEST_INGESTION_ENABLED=false: takes no leases, runs no routes, serves no /ingest/ endpoint |
| Ingestion only | INGEST_FUNCTIONS_ENABLED=false |
Separate them when function traffic and ingestion traffic need different scaling, or when a failing ingestion source should not share a JVM with functions.
Extensions
Section titled “Extensions”An extension is a jar that adds a source kind. Load extensions in exactly one of these ways:
- Mount the jars read-only into
/opt/ingestor/extensions(INGEST_EXTENSIONS_DIR). - Build your own image
FROMthe ingestor image that copies them there as root. - Set
INGEST_EXTENSIONS_MANIFEST=s3://bucket/keyto a manifest that pins each jar by SHA-256 in the same bucket. The runtime downloads and verifies them at start. The manifest and a non-empty extensions directory are mutually exclusive.
Each jar’s manifest must declare Ingestor-Extension-Api: 1; the runtime refuses to start with a jar
built against another major version, naming it. See write an extension.
Secrets
Section titled “Secrets”Ingestion secrets live on the platform, as secret configuration values of the ingestion’s
application at the ingestion’s client. A runtime is given a secret only when the ingestion’s live
definition binds it, the runtime carries the kind and (for a polled source) holds the lease. Each
fetch is logged as security telemetry and counted in fc_ingestion_secret_fetch_total; a refused
fetch is audited. Running routes re-read their secrets every INGEST_SECRETS_CACHE_TTL and rebuild
themselves when a value changed, so a rotated password needs no restart.
The fallback for a secret not yet on the platform is env:<name> in the definition, read from the
runtime’s environment variable INGEST_SECRET_V2_<client>__<name> (letters and digits as they are,
every other character as _ and two hex digits: client acme and env:sftp-password read
INGEST_SECRET_V2_acme__sftp_2Dpassword). Such secrets need a restart to change.
Network rules
Section titled “Network rules”Every host a definition names (SFTP and RabbitMQ hosts, JDBC hosts, API and token endpoints) is
resolved and every address checked when a route starts and before each connection. Loopback,
link-local (including cloud metadata), unspecified addresses and known metadata addresses are refused;
private ranges are allowed. s3, sqs, extensions’ own connections and Camel routes are not checked.
Put runtimes in a network segment that can reach the sources they need and nothing else sensitive.
For sqs sources, give every source queue a dead-letter queue (a redrive policy with a
maxReceiveCount of 5 to 10): the platform keeps a record’s identity for 7 days, and a message that
keeps coming back for longer would make its jobs again.
What to watch
Section titled “What to watch”fc_ingestion_unheldon the platform: polled ingestions running nowhere.- Each ingestion’s Activity page: polls, last poll, last exchange and failures per runtime.
- Each runtime’s readiness and logs. Failures are paced (a failing source backs off up to 5 minutes) and logged in full once, then once a minute with a count.
The runtime has no Prometheus endpoint. Runbook: ingestion silent.