Skip to main content

0005: One image, Api and Worker roles

Status: Accepted ยท Date: 2026-09-29

Contextโ€‹

HTTP traffic and background work scale differently, but splitting into two codebases doubles the build and release work.

Decisionโ€‹

One image. Integrations__Roles selects Api, Worker or both. Jobs take a Postgres advisory lock so only one replica runs each job at a time.

Consequencesโ€‹

  • The API and the worker scale and roll out independently in Kubernetes.
  • The free-tier demo runs both roles in one process.