DocsCore ConceptsWorkers

Workers

Background consumers and their ownership boundaries.

Workers own asynchronous background processing. Kafka partitions provide distribution, while domain services remain responsible for authoritative state changes.

Worker inventory

WorkerResponsibility
Scheduling workerFinds due workflows and creates dispatch work
Workflow workerValidates container payloads, resolves image digests, and updates build state
Execution workerClaims jobs, routes containers to the assigned runtime endpoint, renews leases, and recovers abandoned work
Runtime agentRegisters a Docker-capable runtime node and heartbeats endpoint capacity
Job logs processorWrites retained logs to ClickHouse and Meilisearch
Analytics processorApplies workflow, job, and log events to aggregates
Outbox relayPublishes committed outbox rows to Kafka
Database migrationApplies PostgreSQL and ClickHouse migrations and Meilisearch setup

Processing contract

Workers process records per Kafka partition. Commit policy distinguishes successful work, retryable failures, and terminal handling so offsets are not advanced before the selected policy permits it.

Scaling

Replica count cannot create useful parallelism beyond the relevant Kafka topic partition count. Execution capacity is also bounded by registered runtime nodes, Docker hosts, job lease settings, downstream service latency, and log pipeline capacity.

State ownership

Workers call gRPC services to mutate domain state. They do not become an alternate source of truth for workflows or jobs.

For CONTAINER jobs, jobs-service is also the runtime ownership boundary. It chooses a fresh READY runtime node while claiming the job, stores the runtime owner on the job, and returns the Docker endpoint that the execution worker should use.