By default, all tasks using the Astro or Celery executor run in a default worker queue. You can create additional worker queues to enable multiple worker types or configurations for different groups of tasks, and assign tasks to these queues in your Dag code. For more information about Airflow executors on Astro, see Manage Airflow executors on Astro.
Use worker queues to create optimized execution environments for different types of tasks in the same Deployment. You can use worker queues to:
Worker queues can enhance performance, decrease cost, and increase the reliability of task execution in your Deployment. Specifically:
By configuring multiple worker queues and assigning tasks to these queues based on the requirements of the tasks, you can enhance the performance, reliability, and throughput of your Deployment. For example, consider the following scenario:
You can assign Task A to a worker queue that is configured to use the A20 worker type, which is optimized for running compute-heavy tasks. Then, you can assign Task B to a worker queue that is configured to use the A5 worker type, which is smaller and optimized for general usage.
Each Deployment requires a worker queue named default to run tasks. Tasks that aren’t assigned to a worker queue in your Dag code are executed by workers in the default worker queue.
You can change all settings of the default worker queue except for its name.
You can configure each worker queue on Astro with the following settings:
machine-learning-tasks or short-running-tasks or high-cpu.queued or running state.Each Deployment worker queue has a worker type that determines how many resources are available to your Airflow workers for running tasks. A worker type is a virtualized instance of CPU and memory on your cluster that is specific to the Astro platform. The underlying node instance type running your worker can vary based on how Astro optimizes resource usage on your cluster.
Each virtualized instance of your worker type is a worker. Astro and Celery workers can run multiple tasks at once, while Kubernetes workers only scale up and down to run a single task at a time.
The following table lists all available worker types on Astro Deployments.
All worker types additionally have 10 GiB of ephemeral storage that your tasks can use when storing small amounts of data within the worker.
astro deployment worker-queue create command in the Astro CLI to create a worker queue. See the CLI Command Reference.In the Astro UI, select a Workspace, click Deployments, and then select a Deployment.
Click the Options menu of the Deployment you want to update, and select Edit Deployment.

In the Execution section, click Add Queue to create a new worker queue, and then configure its related attributes. Note that you can’t change the name of a worker queue after you create it.
When you’re done creating your worker queue, click Update Deployment to save your changes.
By default, all tasks run in the default worker queue. To run tasks on a different worker queue, assign the task to the worker queue in your Dag code.
In your Dag code, add a queue='<worker-queue-name>' argument to the definition of the task. If a task is assigned to a queue that doesn’t exist or isn’t referenced properly, the task might remain in a queued state and fail to execute. Make sure that the name of the queue in your Dag code matches the name of the queue in the Astro UI.
Astronomer recommends using Apache Airflow’s Taskflow API to define your task argument. The Taskflow API is feature in Airflow 2 that includes a task decorator and makes Dags easier to write. In the following examples, all instances of the task will run in the machine-learning-tasks queue. Choose an example based on whether or not you use the Taskflow API.
astro deployment worker-queue update command in the Astro CLI to update a worker queue. See the CLI Command Reference.You can update worker queue configurations at any time. The worker queue name can’t be changed.
If you need to change the worker type of an existing worker queue, Astronomer recommends making the change at a time when it won’t affect production pipelines. After you’ve changed a worker type, Astronomer recommends waiting a minimum of five minutes before pushing new code to your Deployment.
In the Astro UI, select a Workspace, click Deployments, and then select a Deployment.
Click the Options menu of the Deployment you want to update, and select Edit Deployment.

Expand the Execution section if it isn’t already expanded.
Update the worker queue settings, and then click Update Deployment.
The Airflow components of your Deployment automatically restart to apply the updated resource allocations. This action is equivalent to deploying code to your Deployment and doesn’t impact running tasks that have 24 hours to complete before running workers are terminated. See What happens during a code deploy.
If you see tasks getting stuck, it might be because the worker queue configuration doesn’t align with the Airflow Pools, a component that allows you to control execution parallelism. Make sure to update your Airflow Pools to match the changes in potential maximum task parallelism caused by changes to the worker queue.
For more information on limited parallelism, see Airflow Pools.
astro deployment worker-queue delete command in the Astro CLI to delete a worker queue. See the CLI Command Reference.All scheduled tasks that are assigned to a worker queue after the worker queue is deleted remain in a queued state indefinitely and won’t execute. To avoid stalled task runs, ensure that you reassign all tasks from a worker queue before deleting it. You can either remove the worker queue argument or assign the task to a different queue.
In the Astro UI, select a Workspace, click Deployments, and then select a Deployment.
Click the Options menu of the Deployment you want to update, and select Edit Deployment.

Expand the Execution section if it isn’t already expanded.
Click Remove queue to delete the worker queue, and then click Update Deployment.