Running multiple agents
Each Dagster+ full deployment (e.g., prod
) needs to have at least one agent running. A single agent is adequate for many use cases, but you may want to run multiple agents to provide redundancy if a single agent goes down.
Running multiple agents in the same environment
To run multiple agents in the same environment (e.g., multiple Kubernetes agents in the same namespace), you can set the number of replicas in the configuration for your particular agent type:
- Docker
- Kubernetes
- Amazon ECS
In Docker
In Docker, you can set the number of replicas for a service in the docker-compose.yaml
file if the deployment mode is set to replicated
(which is the default):
services:
dagster-cloud-agent:
...
deploy:
mode: replicated
replicas: 2
In Kubernetes
In Kubernetes, the number of replicas is set in the Helm chart. You can set the number of replicas in the Helm command:
helm upgrade \
...
--set replicas=2
or if using a values.yaml
file:
dagsterCloudAgent:
...
replicas: 2