Scaling
Engine replicas coordinate durable jobs, subscriptions and mutation commands
through PostgreSQL locks, versions and leases. Frontend containers are also
stateless because /config.js is generated at startup.
docker compose --env-file .env.prod \ -f compose.yaml -f compose.prod.yaml \ up -d --scale abada-engine=2Do not scale PostgreSQL with this command. Production database replication, failover and backups belong to your PostgreSQL operating model. Before raising replica count, size the database connection limit for the combined Hikari pools and run a replica-termination test against representative workflows.
Traefik discovers engine replicas through Docker labels. Fixed container names are intentionally absent because they prevent Compose scaling.
Agent execution scales independently: the Agent Worker is a stateless
sidecar that polls abada:agent tasks and reports attempt metadata through
the durable worker protocol. More instances of abada-agent-worker claim
more concurrent model work without changing engine replica semantics; model
calls still never run inside engine commands. Leases, heartbeats and
idempotent completion keep duplicate dispatch and duplicate transitions out.