Skip to content

Coordinator And Worker Topology ​

This page answers the practical question behind the self-host HA work: what happened to the old "orchestrator"?

In durable QUEUE_ASYNC execution, orchestration is split into two runtime roles:

  1. Coordinator: the durable control plane.
  2. Transition worker: the data-plane executor for bounded pipeline continuations.

The generated application-facing orchestrator still exposes entrypoints. Synchronous execution calls the pipeline execution service directly; asynchronous admission calls the control plane. A transition worker still runs the compiled pipeline through the execution service and runner. The coordinator split did not move per-step execution into the coordinator. See the execution layers.

Names such as orchestrator-svc and pipeline.orchestrator.* remain in generated artifacts and configuration. They do not identify a durable role on their own. In the self-host HA model, configuration selects coordinator and worker responsibilities; one process can host both.

Terms ​

TermMeaning
orchestratorGenerated application/runtime surface and configuration namespace; its synchronous execution and durable admission paths have different responsibilities.
CoordinatorDurable control-plane role. It owns execution records, await units, leases, retry/DLQ, re-drive, release activation, release pinning, worker lifecycle checks, and status/result APIs.
Transition workerData-plane role. It receives a pinned transition command, executes from the current continuation point to a terminal result or an await requiring durable fallback, and returns COMPLETED, WAITING_EXTERNAL, or FAILED.
Step/runtime serviceGenerated business-step runtime that a transition worker may call through REST, gRPC, or local transport.
Durable substrateExternal state/queue/blob systems such as DynamoDB, SQS, S3-compatible storage, Postgres, or Kafka.

Before And After ​

Before the split, "orchestrator" was a broad word for the generated runtime that drove the pipeline.

In the self-host HA model, those responsibilities are separated.

The coordinator is where durable orchestration lives. The worker is where business transitions run.

Ownership ​

ConcernCoordinatorTransition workerStep/runtime service
Submit executionyesnono
Execution recordyesnono
Await unit and pending interactionyesnono
Lease claim and recoveryyesnono
Durable transition retry, DLQ, and re-driveyesreturns classified outcomeno
Per-step invocation/retry policynoowns the applicable execution shellapplies policy at its invocation boundary; avoid duplicate retries
Release activation and execution pinningyesnono
Worker lifecycle admissionyesreports identity/healthno
Business step executionnodrives transitionyes
Mapper/type/business codenoyes, through packaged pipeline codeyes
Command effect authority (CommandEffectStore)no (verifies command-authority-v1)yes, under verified leased scope + recoverable storeexecutes provider operation
External side effectsnopossible through stepsyes

Role Versus Artifact ​

orchestrator-svc is a module or image name, not a guarantee that the process is the durable coordinator role.

Artifact/moduleCan run as coordinator?Can run as worker?Notes
restaurant-approval/monolith-svcyesyesThe container demo runs the same image in two modes.
csv-payments/orchestrator-svcyesyesThe CSV worker hosts the canonical pipeline order and delegates generated step calls to grouped runtime services.
csv-payments/pipeline-runtime-svcnostep/runtime serviceHosts grouped gRPC step services and selected provider mock.
csv-payments/persistence-svcnosupporting app serviceHosts persistence plugin/aspect behavior.

The role is selected by configuration:

properties
# Coordinator role
pipeline.orchestrator.control-plane.enabled=true
pipeline.orchestrator.admin.enabled=true
pipeline.orchestrator.worker.rest.base-url=http://worker:8181
pipeline.orchestrator.control-plane.require-remote-worker=true

# Worker role
pipeline.orchestrator.worker.rest.server-enabled=true

With no remote worker target, the local in-process worker is selected. This worker invocation choice is separate from pipeline.transport: the worker may still call step services over REST or gRPC. LOCAL step invocation means a call within the same process, not merely an endpoint on localhost. The in-process worker is useful for local demos. Separated self-host HA should set pipeline.orchestrator.control-plane.require-remote-worker=true so a coordinator process cannot silently execute transitions locally.

A configured remote step endpoint is not a registered transition worker. The registered REST worker path currently requires the coordinator's generated contract and one whole-bundle application archive; it rejects distributed artifact placement. That restriction does not prohibit the separate generated remote step calls shown below. See RegisteredRestWorkerTargets.

One Process Versus Separated HA ​

The one-process path is intentionally batteries-included. It proves the programming model quickly, but it is not the HA topology. The separated path is the compute-first HA model.

Restaurant Reference ​

Restaurant approval is the base self-host HA reference because it is the smallest human-await path.

The same monolith-svc image runs twice:

  1. coordinator mode: durable state, release/admin APIs, worker admission, work dispatch;
  2. worker mode: signed transition worker endpoint and restaurant pipeline code.

This is not a contradiction of "monolith" at runtime. monolith-svc describes the packaged artifact shape. The deployment still chooses whether to run one process or two role-specific processes from that artifact.

CSV Payments Reference ​

CSV Payments is the advanced self-host HA reference. It proves stream input, provider-portable await completions, and generated step/runtime calls.

The default lane uses SQS await request/completion queues so the whole stack can run against the LocalStack-backed AWS-shaped substrate. The Kafka lane runs the same coordinator and worker topology with Kafka as the await provider substrate. In that lane, the transition worker consumes Kafka completions for the live await session while using the same Dynamo await tables as the coordinator. That proves the await abstraction is not tied to one broker without forcing Kafka completions through the coordinator before downstream steps can proceed.

Transition Sequence ​

Notice what does not happen in the transition hot path:

  1. the coordinator does not dynamically load registered code;
  2. the coordinator does not re-hash artifacts on every transition;
  3. the worker does not own durable execution state;
  4. active release changes do not affect already-pinned executions.

Why This Split Matters ​

Self-host HA depends on keeping durable orchestration in the coordinator and business execution in workers. That gives TPF:

  1. durable QUEUE_ASYNC execution without relying on a single app process surviving;
  2. release pinning so retries and awaits resume against the version recorded on the execution;
  3. worker identity checks so a coordinator only accepts work when a matching release is actually running;
  4. provider-portable await transports such as SQS and Kafka;
  5. a future path to managed operation of the same coordinator boundary.

AWS Lambda Durable Functions is now the preferred AWS coordination host for QUEUE_ASYNC, under ADR-0069. It drives bounded TPF actions while TPF retains semantic authority; SQS is the supported initial worker boundary for COMPUTE or FUNCTION workers. The merged host includes an SQS transition-worker Lambda handler. This is distinct from an ordinary generated HTTP FUNCTION step handler.

Use AWS Durable Coordination for the deployment contract and the production completion plan for remaining qualification gates. Neither FUNCTION adapter support nor the local reference stacks alone prove a production deployment.

Future managed operation can run the same control-plane shape, but the current self-host references are local verification stacks, not production deployment packages and not managed-service promises.

Diagram