Deployments
A deployment is a named group of workers that owns a set of workflow definitions and receives all executions for those definitions. Workers join a deployment by setting the DEPLOYMENT_NAME environment variable at startup. See Workers > Starting a worker for the launch command.
All workers running under the same DEPLOYMENT_NAME form a single deployment. They share identical workflow definitions and collectively receive all executions routed to that deployment.
Set DEPLOYMENT_NAME per environment (for example, invoice-service-staging or invoice-service-prod) so staging and production workers never compete for the same executions.
Why deployments?
Deployments give you four key capabilities:
- Worker isolation: In a shared workspace, each deployment exclusively receives executions for its registered workflows. Multiple teams can run workers simultaneously without interfering with each other.
- Automatic routing: When a single active deployment owns a workflow, executions route to it automatically. No manual configuration needed.
- Horizontal scaling: Run multiple workers under the same
DEPLOYMENT_NAMEto increase throughput. The platform distributes tasks across all of them automatically. - Lifecycle tracking: A deployment is considered active as long as at least one of its workers has heartbeated within the liveness window. Inactive deployments are excluded from routing.
For a complete guide covering execution routing, conflict detection, and the Deployments API, see Managing Deployments.