Operations

Operating the Clearing Layer

Running Ductor in production — the operational model, plus migrations, observability, security, keys, and day-2 runbooks.

Day-2 operations for a running Ductor deployment. These pages assume you've already deployed and focus on keeping it healthy, secure, observable, and recoverable. If you're wiring configuration, keep the configuration reference open alongside.

The operational model

Ductor ships as a single binary. Every process runs the same image; what a process does is selected at boot by the --role flag on ductor serve (default all — the monolith topology, byte-identical to a single-process deployment):

RoleRunsUse for
allEverything (default)Single-process and small deployments
apiPublic REST + Connect-RPC, MCP, admin transportsStateless, horizontally-scaled API replicas
workerDAG coordinator + step workers + scheduling resolversThe pods that own the workflow runtime
executorInternal ExecutorService only (task dispatch target)Optional split executor plane

Combine roles on one process — --role=worker,executor is common. Only the worker role runs the coordinator: a serial coordinator plus parallel workers, so correctness survives crashes and horizontal scaling. Work is always either committed by the coordinator or recorded as a worker attempt, never silently lost.

State splits cleanly by durability:

  • PostgreSQL is the source of truth — workflow runs, step attempts, pools, rules, tenants, encrypted connections, idempotency records, audit. Losing it loses durable state; back it up.
  • Redis/Dragonfly is ephemeral — cache, flow-control counters, the tiered queue, pub/sub. Rebuildable, but its loss is disruptive to in-flight work.
ductor binaryrole set by --role api worker executor PostgreSQLsource of truth Redis / Dragonflyephemeral

Because readiness re-checks Postgres and Redis on every call, pod rotation is readiness-based: an unhealthy pod flips /ready to 503 and is pulled from rotation without being killed. Keep liveness and readiness on different endpoints — see Health checks.

Production checklist gates

Before promoting a change, the operator checklist expects three gates green: make validate-config (configuration validation), make docs-check, and make openapi-check (so operator docs and the generated API contract don't drift). Run migrations explicitly in production rather than relying on auto-migrate, and add or update a runbook in the same change set when a system behavior changes.

In this section